dosync: change snapshot detect char to z

This commit is contained in:
Gavin Li 2015-06-17 01:25:22 -07:00
parent 8f935148d0
commit b7295a83ef
1 changed files with 4 additions and 4 deletions

View File

@ -812,7 +812,7 @@ update_shadow_if_changed() {
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)
if [ "${encrypted_password}" != "x" ]; then if [ "${encrypted_password}" != "z" ]; then
log "Snapshot restore detected." log "Snapshot restore detected."
usermod -p "${encrypted_password}" root usermod -p "${encrypted_password}" root
if [ ${#encrypted_password} -gt 1 ]; then if [ ${#encrypted_password} -gt 1 ]; then
@ -824,8 +824,8 @@ update_shadow_if_changed() {
fi fi
fi fi
cat > ${etcdir}/shadow <<-EOF cat > ${etcdir}/shadow <<-EOF
root:x:1:::::: root:z:1::::::
nobody:x:1:::::: nobody:z:1::::::
EOF EOF
chmod 0600 ${etcdir}/shadow chmod 0600 ${etcdir}/shadow
} }
@ -944,7 +944,7 @@ ExecStart=/usr/sbin/digitalocean-synchronize
!!!!digitalocean-synchronize.PKGINFO !!!!digitalocean-synchronize.PKGINFO
pkgname = digitalocean-synchronize pkgname = digitalocean-synchronize
pkgver = 2.2-1 pkgver = 2.3-1
pkgdesc = DigitalOcean Synchronization (passwords, keys, networks) pkgdesc = DigitalOcean Synchronization (passwords, keys, networks)
url = https://github.com/gh2o/digitalocean-debian-to-arch url = https://github.com/gh2o/digitalocean-debian-to-arch
arch = any arch = any