You've already forked fedora-toolbox
forked from davejansen/fedora-bootc
Attempt to re-add (optionally) writing passwd changes
This commit is contained in:
@@ -14,20 +14,28 @@ echo "/usr/lib/group contents:"
|
|||||||
cat /usr/lib/group
|
cat /usr/lib/group
|
||||||
|
|
||||||
## Handle files that rpm-ostree would normally remove
|
## Handle files that rpm-ostree would normally remove
|
||||||
## Borrowed from: https://github.com/hhd-dev/rechunk/blob/master/1_prune.sh#L33
|
## Adapted from: https://github.com/hhd-dev/rechunk/blob/master/1_prune.sh#L33
|
||||||
# if [ -f /etc/passwd ]; then
|
|
||||||
# echo
|
if [ -f /etc/passwd ]; then
|
||||||
# echo Appending the following passwd users to /usr/lib/passwd
|
out=$(grep -v "root" /etc/passwd)
|
||||||
# out=$(grep -v "root" /etc/passwd)
|
|
||||||
# echo "$out"
|
if [ ! -z "$out" ]; then
|
||||||
# echo "$out" >>/usr/lib/passwd
|
echo
|
||||||
# fi
|
echo Appending the following passwd users to /usr/lib/passwd
|
||||||
|
echo "$out"
|
||||||
|
echo "$out" >>/usr/lib/passwd
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
if [ -f /etc/group ]; then
|
if [ -f /etc/group ]; then
|
||||||
echo
|
|
||||||
echo Appending the following group entries to /usr/lib/group
|
|
||||||
out=$(grep -v "root\|wheel" /etc/group)
|
out=$(grep -v "root\|wheel" /etc/group)
|
||||||
echo "$out"
|
|
||||||
echo "$out" >>/usr/lib/group
|
if [ ! -z "$out" ]; then
|
||||||
|
echo
|
||||||
|
echo Appending the following group entries to /usr/lib/group
|
||||||
|
echo "$out"
|
||||||
|
echo "$out" >>/usr/lib/group
|
||||||
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ -f /etc/passwd ] || [ -f /etc/group ]; then
|
if [ -f /etc/passwd ] || [ -f /etc/group ]; then
|
||||||
|
|||||||
Reference in New Issue
Block a user