Fix indentation in %sysusers_create_compat macro (rhbz#2132835)
Automatic unindentation after <<-EOF only works with tabs. Jesus.
This commit is contained in:
parent
b2ad8fb38b
commit
3c5b26ff79
@ -1,4 +1,5 @@
|
||||
#!/bin/bash
|
||||
# -*- mode: shell-script; indent-tabs-mode: true; tab-width: 4; -*-
|
||||
|
||||
# This script turns sysuser.d files into scriptlets mandated by Fedora
|
||||
# packaging guidelines. The general idea is to define users using the
|
||||
@ -17,12 +18,12 @@ user() {
|
||||
{ [ "$shell" = '-' ] || [ "$shell" = '' ]; } && shell=/usr/sbin/nologin
|
||||
|
||||
if [ "$uid" = '-' ] || [ "$uid" = '' ]; then
|
||||
cat <<EOF
|
||||
cat <<-EOF
|
||||
getent passwd '$user' >/dev/null || \\
|
||||
useradd -r -g '$group' -d '$home' -s '$shell' -c '$desc' '$user' || :
|
||||
EOF
|
||||
else
|
||||
cat <<EOF
|
||||
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' || :
|
||||
|
Loading…
Reference in New Issue
Block a user