projects
/
bin.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
389a198
)
preinst-backup: handle /etc in bzr
author
Martin Pitt
<martin.pitt@ubuntu.com>
Sun, 5 Aug 2007 17:38:39 +0000
(19:38 +0200)
committer
Martin Pitt
<martin.pitt@ubuntu.com>
Sun, 5 Aug 2007 17:38:39 +0000
(19:38 +0200)
preinst-backup
patch
|
blob
|
history
diff --git
a/preinst-backup
b/preinst-backup
index 23d2b881f24d02a91aa3a404c2a9e2aea4e9d7bf..68df29bf2b97a1403712fe0f83e63ec338b3c4b5 100755
(executable)
--- 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