Make sure passwd file exists before writing to it
This commit is contained in:
parent
fcbb1ddecd
commit
7d91290118
|
@ -8,4 +8,5 @@ if [ "${BACKUP_ROOT}" == "" ] || [ "$(realpath ${BACKUP_ROOT})" == "/" ]; then
|
|||
exit 1
|
||||
fi
|
||||
|
||||
touch "${BACKUP_ROOT}/etc/passwd"
|
||||
cat /etc/passwd | grep "::${BACKUP_ROOT}/[^/:]\+:/bin/[^:]\+$" > "${BACKUP_ROOT}/etc/passwd"
|
||||
|
|
Loading…
Reference in New Issue