]> piware.de Git - bin.git/blobdiff - preinst-backup
retry-gh-systemd-test: Move to experimental branch until buster gets released
[bin.git] / preinst-backup
index 23d2b881f24d02a91aa3a404c2a9e2aea4e9d7bf..eef4f5f73998020a0610087b0d05361c1a9603d7 100755 (executable)
@@ -1,14 +1,9 @@
 #!/bin/sh -ex
 
-CURBACKUP=`ls -t /var/backups/pibackup/full* | head -n 1`
-[ -e "$CURBACKUP" ] || {
-    echo no current full backup in /var/backups/pibackup
+if [ -n "`cd /etc; bzr modified`" ]; then
+    echo "uncommitted changes in /etc, aborting" >&2
     exit 1
-}
-cp $CURBACKUP /home/
-
-apt-get autoclean
-mkdir -p /home/aptcache
-rm -rf /home/aptcache/*
-cp /var/cache/apt/archives/*.deb /home/aptcache/
+fi
 
+# push /etc/
+(cd /etc; HOME=/home/martin bzr push)