More stuff
authorCarl Baldwin <cnb@ball.(none)>
Sat, 29 Oct 2005 20:34:36 +0000 (14:34 -0600)
committerCarl Baldwin <cnb@ball.(none)>
Sat, 29 Oct 2005 20:34:36 +0000 (14:34 -0600)
scripts/NOTES [new file with mode: 0644]
scripts/burn-imgs.sh
scripts/config.sh
scripts/pack-image.sh

diff --git a/scripts/NOTES b/scripts/NOTES
new file mode 100644 (file)
index 0000000..c304ad6
--- /dev/null
@@ -0,0 +1,3 @@
+Need to have backup group.
+Mail daemon should be a member of the backup group and the group of the DVD writer in order to eject the disk.
+/backup and subdirectories should have mode 660 with group sticky bit set.
index 27f7ad201b06b7d0e9b689c43fd905886d22ca13..a3b6fb2e7de73d3560ba3ed7bcb7a48d340958a7 100755 (executable)
@@ -4,14 +4,14 @@ PATH=$(dirname $0):/bin:/usr/bin
 
 . config.sh
 
 
 . config.sh
 
+# If the noburn file is there then don't burn.
+[ -f "$burnlockfile" ] && exit 0
+
 # Discover disk images by looking for .img.md5sum files in $imagedir
 imgmd5=$(ls $imagedir/*.img.md5sum | head -n 1)
 
 logfile=$(tempfile)
 
 # Discover disk images by looking for .img.md5sum files in $imagedir
 imgmd5=$(ls $imagedir/*.img.md5sum | head -n 1)
 
 logfile=$(tempfile)
 
-# If the noburn file is there then don't burn.
-[ -f "$burnlockfile" ] && exit 0
-
 # If we didn't find an non-empty file then exit gracefully
 [ -z "$imgmd5" ] && exit 0
 [ -s "$imgmd5" ] || exit 0
 # If we didn't find an non-empty file then exit gracefully
 [ -z "$imgmd5" ] && exit 0
 [ -s "$imgmd5" ] || exit 0
index 621b76f8b4508bce448330d69914167c231bfe78..f2046ac7a1099d73d1434103756a7566c754b6ab 100755 (executable)
@@ -9,7 +9,7 @@ backups="$tmpdir/backup-list.db"
 statusfile="$tmpdir/backup-status.txt"
 imagedir="/backup/imgs"
 lastbackupfile="$imagedir/lastbackup"
 statusfile="$tmpdir/backup-status.txt"
 imagedir="/backup/imgs"
 lastbackupfile="$imagedir/lastbackup"
-dev="/dev/hdc"
+dev="/dev/dvdwr"
 sdev="ATA:1,0,0"
 burnlockfile="$imagedir/noburn"
 
 sdev="ATA:1,0,0"
 burnlockfile="$imagedir/noburn"
 
index 60e6c50ca3370dd0037d65aa7066a4822528847a..5bbfc9650594c82a70e1530a150e0f3f599ea0d0 100755 (executable)
@@ -14,6 +14,9 @@ restorescript="$scriptsdir/restore.sh"
 
 echo "Creating directories"
 mkdir --mode=700 -p $datadir $imagedir $isomountdir $tmpdir
 
 echo "Creating directories"
 mkdir --mode=700 -p $datadir $imagedir $isomountdir $tmpdir
+chgrp backup $imagedir
+chmod g+s    $imagedir
+chmod g+w    $imagedir
 
 echo "Creating the iso image in $isoimage"
 dd if=/dev/null of=$isoimage bs=1M count=0 seek=4440
 
 echo "Creating the iso image in $isoimage"
 dd if=/dev/null of=$isoimage bs=1M count=0 seek=4440