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. rhel-only Resolves: #2217149
This commit is contained in:
parent
b99e4e7874
commit
00374b7b6e
@ -20,16 +20,16 @@ user() {
|
|||||||
if [ "$uid" = '-' ] || [ "$uid" = '' ]; then
|
if [ "$uid" = '-' ] || [ "$uid" = '' ]; then
|
||||||
cat <<-EOF
|
cat <<-EOF
|
||||||
getent passwd '$user' >/dev/null || \\
|
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
|
EOF
|
||||||
else
|
else
|
||||||
cat <<-EOF
|
cat <<-EOF
|
||||||
if ! getent passwd '$user' >/dev/null; then
|
if ! getent passwd '$user' >/dev/null; then
|
||||||
if ! getent passwd '$uid' >/dev/null; then
|
if ! getent passwd '$uid' >/dev/null; then
|
||||||
useradd -r -u '$uid' -g '$group' -d '$home' -s '$shell' -c '$desc' '$user' || :
|
useradd -r -u '$uid' -g '$group' -d '$home' -s '$shell' -c '$desc' '$user' || :
|
||||||
else
|
else
|
||||||
useradd -r -g '$group' -d '$home' -s '$shell' -c '$desc' '$user' || :
|
useradd -r -g '$group' -d '$home' -s '$shell' -c '$desc' '$user' || :
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
EOF
|
EOF
|
||||||
@ -57,7 +57,7 @@ usermod() {
|
|||||||
|
|
||||||
cat <<-EOF
|
cat <<-EOF
|
||||||
if getent group '$group' >/dev/null; then
|
if getent group '$group' >/dev/null; then
|
||||||
usermod -a -G '$group' '$user' || :
|
usermod -a -G '$group' '$user' || :
|
||||||
fi
|
fi
|
||||||
EOF
|
EOF
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user