From: Martin Pitt Date: Sun, 5 Aug 2007 17:38:39 +0000 (+0200) Subject: preinst-backup: handle /etc in bzr X-Git-Url: https://piware.de/gitweb/?a=commitdiff_plain;h=0249e78b01cf0ab0995671141b26904b13c40393;p=bin.git preinst-backup: handle /etc in bzr --- diff --git a/preinst-backup b/preinst-backup index 23d2b88..68df29b 100755 --- a/preinst-backup +++ b/preinst-backup @@ -1,5 +1,13 @@ #!/bin/sh -ex +if [ -n "`cd /etc; bzr modified`" ]; then + echo "uncommitted changes in /etc, aborting" >&2 + exit 1 +fi + +# push /etc/ +(cd /etc; HOME=/root bzr push) + CURBACKUP=`ls -t /var/backups/pibackup/full* | head -n 1` [ -e "$CURBACKUP" ] || { echo no current full backup in /var/backups/pibackup