dosync: mkdir etcdir on the off chance it doesnt exist

This commit is contained in:
Gavin Li 2015-06-17 00:23:10 -07:00
parent da9b104a2d
commit f5e8382a0e
1 changed files with 1 additions and 0 deletions

View File

@ -808,6 +808,7 @@ netmask_to_prefix() {
update_shadow_if_changed() {
local etcdir=$1/etc
mkdir -p ${etcdir} || return 0
if [ -e ${etcdir}/shadow ]; then
# change password if file was touched
local encrypted_password=$(awk -F: '$1 == "root" { print $2 }' ${etcdir}/shadow)