From 0249e78b01cf0ab0995671141b26904b13c40393 Mon Sep 17 00:00:00 2001 From: Martin Pitt Date: Sun, 5 Aug 2007 19:38:39 +0200 Subject: [PATCH] preinst-backup: handle /etc in bzr --- preinst-backup | 8 ++++++++ 1 file changed, 8 insertions(+) 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 -- 2.39.5