dosync: mkdir etcdir on the off chance it doesnt exist
This commit is contained in:
parent
da9b104a2d
commit
f5e8382a0e
|
@ -808,6 +808,7 @@ netmask_to_prefix() {
|
||||||
|
|
||||||
update_shadow_if_changed() {
|
update_shadow_if_changed() {
|
||||||
local etcdir=$1/etc
|
local etcdir=$1/etc
|
||||||
|
mkdir -p ${etcdir} || return 0
|
||||||
if [ -e ${etcdir}/shadow ]; then
|
if [ -e ${etcdir}/shadow ]; then
|
||||||
# change password if file was touched
|
# change password if file was touched
|
||||||
local encrypted_password=$(awk -F: '$1 == "root" { print $2 }' ${etcdir}/shadow)
|
local encrypted_password=$(awk -F: '$1 == "root" { print $2 }' ${etcdir}/shadow)
|
||||||
|
|
Loading…
Reference in New Issue