From ef79df9490c8a47033c4d242feb5c55ccc5e342d Mon Sep 17 00:00:00 2001 From: Zbigniew Jędrzejewski-Szmek Date: Apr 26 2023 11:23:03 +0000 Subject: sysusers.generate-pre.sh: fix indentation in generated scripts We need to use a mix of spaces and tabs: the tabs are removed because of -EOF, and then the spaces indent the output. Jesus. --- diff --git a/sysusers.generate-pre.sh b/sysusers.generate-pre.sh index a077bb7..6bc0ca6 100755 --- a/sysusers.generate-pre.sh +++ b/sysusers.generate-pre.sh @@ -20,16 +20,16 @@ user() { if [ "$uid" = '-' ] || [ "$uid" = '' ]; then cat <<-EOF getent passwd '$user' >/dev/null || \\ - useradd -r -g '$group' -d '$home' -s '$shell' -c '$desc' '$user' || : + useradd -r -g '$group' -d '$home' -s '$shell' -c '$desc' '$user' || : EOF else cat <<-EOF if ! getent passwd '$user' >/dev/null; then - if ! getent passwd '$uid' >/dev/null; then - useradd -r -u '$uid' -g '$group' -d '$home' -s '$shell' -c '$desc' '$user' || : - else - useradd -r -g '$group' -d '$home' -s '$shell' -c '$desc' '$user' || : - fi + if ! getent passwd '$uid' >/dev/null; then + useradd -r -u '$uid' -g '$group' -d '$home' -s '$shell' -c '$desc' '$user' || : + else + useradd -r -g '$group' -d '$home' -s '$shell' -c '$desc' '$user' || : + fi fi EOF @@ -57,7 +57,7 @@ usermod() { cat <<-EOF if getent group '$group' >/dev/null; then - usermod -a -G '$group' '$user' || : + usermod -a -G '$group' '$user' || : fi EOF }