]> piware.de Git - bin.git/commitdiff
preinst-backup: handle /etc in bzr
authorMartin Pitt <martin.pitt@ubuntu.com>
Sun, 5 Aug 2007 17:38:39 +0000 (19:38 +0200)
committerMartin Pitt <martin.pitt@ubuntu.com>
Sun, 5 Aug 2007 17:38:39 +0000 (19:38 +0200)
preinst-backup

index 23d2b881f24d02a91aa3a404c2a9e2aea4e9d7bf..68df29bf2b97a1403712fe0f83e63ec338b3c4b5 100755 (executable)
@@ -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