Accepting request 528932 from home:dimstar:Factory
Any thoughts about this change? currently we simply hide all errors deep into zypp's log files and somehow hope the system would be working in the end OBS-URL: https://build.opensuse.org/request/show/528932 OBS-URL: https://build.opensuse.org/package/show/Base:System/sysuser-tools?expand=0&rev=11
This commit is contained in:
parent
173b764048
commit
ac43675b41
@ -1,3 +1,12 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Wed Sep 27 11:06:52 UTC 2017 - dimstar@opensuse.org
|
||||||
|
|
||||||
|
- sysusers2shadow.sh: Exit if one of the useradd/groupadd/usermod
|
||||||
|
call fails: the resulting system is quite undefined if this
|
||||||
|
should happen.
|
||||||
|
- sysusers-generate-pre: exit the pre script with the exit code
|
||||||
|
of sysusers2shadow.sh.
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Mon Jun 19 14:07:51 CEST 2017 - kukuk@suse.de
|
Mon Jun 19 14:07:51 CEST 2017 - kukuk@suse.de
|
||||||
|
|
||||||
|
@ -19,6 +19,6 @@ lines=`wc -l < "$tmpfile"`
|
|||||||
|
|
||||||
echo '#!/bin/bash'
|
echo '#!/bin/bash'
|
||||||
echo "tail -n $lines \$0 | /usr/sbin/sysusers2shadow"
|
echo "tail -n $lines \$0 | /usr/sbin/sysusers2shadow"
|
||||||
echo "exit 0"
|
echo "exit $?"
|
||||||
echo '######## data below ########'
|
echo '######## data below ########'
|
||||||
cat "$tmpfile"
|
cat "$tmpfile"
|
||||||
|
@ -12,7 +12,7 @@ do
|
|||||||
ARGUMENTS="-g ${arr[2]} $ARGUMENTS"
|
ARGUMENTS="-g ${arr[2]} $ARGUMENTS"
|
||||||
fi
|
fi
|
||||||
echo "groupadd -r $ARGUMENTS"
|
echo "groupadd -r $ARGUMENTS"
|
||||||
/usr/bin/getent group "${arr[1]}" >> /dev/null || /usr/sbin/groupadd -r $ARGUMENTS
|
/usr/bin/getent group "${arr[1]}" >> /dev/null || /usr/sbin/groupadd -r $ARGUMENTS || exit $?
|
||||||
;;
|
;;
|
||||||
u*)
|
u*)
|
||||||
eval arr=( $LINE )
|
eval arr=( $LINE )
|
||||||
@ -30,12 +30,12 @@ do
|
|||||||
ARGUMENTS="-U $ARGUMENTS"
|
ARGUMENTS="-U $ARGUMENTS"
|
||||||
fi
|
fi
|
||||||
echo "useradd -r -s /sbin/nologin -c \"${arr[3]}\" $ARGUMENTS"
|
echo "useradd -r -s /sbin/nologin -c \"${arr[3]}\" $ARGUMENTS"
|
||||||
/usr/bin/getent passwd ${arr[1]} >> /dev/null || /usr/sbin/useradd -r -s /sbin/nologin -c "${arr[3]}" $ARGUMENTS
|
/usr/bin/getent passwd ${arr[1]} >> /dev/null || /usr/sbin/useradd -r -s /sbin/nologin -c "${arr[3]}" $ARGUMENTS || exit $?
|
||||||
;;
|
;;
|
||||||
m*)
|
m*)
|
||||||
eval arr=( $LINE )
|
eval arr=( $LINE )
|
||||||
echo "usermod -a -G ${arr[2]} ${arr[1]}"
|
echo "usermod -a -G ${arr[2]} ${arr[1]}"
|
||||||
/usr/sbin/usermod -a -G ${arr[2]} ${arr[1]}
|
/usr/sbin/usermod -a -G ${arr[2]} ${arr[1]} || exit $?
|
||||||
;;
|
;;
|
||||||
r*)
|
r*)
|
||||||
echo "range option ignored: \"$LINE\""
|
echo "range option ignored: \"$LINE\""
|
||||||
|
Loading…
Reference in New Issue
Block a user