X-Git-Url: https://hackdaworld.org/gitweb/?a=blobdiff_plain;f=backup.sh;h=cbed041a8047980d3f68db156047e3c3bc0004fa;hb=856aed4ee23291972e9595a5f131feb9d4be1b3f;hp=d7bce9a36bc064a0065b292cb8fc5626914ad269;hpb=9510447e56f49f8495b0328b56beacafe1f25074;p=scripts%2Fscripts.git diff --git a/backup.sh b/backup.sh index d7bce9a..cbed041 100755 --- a/backup.sh +++ b/backup.sh @@ -5,6 +5,7 @@ backup_date=`date | awk '{ print $3"."$2"."$6 }'` host=`hostname` +[ ! -d /mnt/nfs ] && mkdir -p /mnt/nfs # set the backup directory if [ "$host" = "gate" ] ; then @@ -24,7 +25,7 @@ elif [ "$host" = "hackstation" ] ; then elif [ "$host" = "hdw" ] ; then mount -tnfs hackstation:/mnt/lfs/backup /mnt/nfs backup_dir="/mnt/nfs" -elif [ "$host" = "left-hand" ] ; then +elif [ "$host" = "compaq" ] ; then mount -tnfs hackstation:/mnt/lfs/backup /mnt/nfs backup_dir="/mnt/nfs" else @@ -77,9 +78,9 @@ echo "config stuff:" mkdir ./${host}-conf && cd ./${host}-conf for i in $kernel_num; do - if [ -f /usr/src/linux-${i}*/.config ] ; then + if [ -f /usr/src/linux-${i}/.config ] ; then echo "copying /usr/src/linux/.config" - cp /usr/src/linux-${i}*/.config ./$host-kernel-${i}-config + cp /usr/src/linux-${i}/.config ./$host-kernel-${i}-config fi done @@ -147,7 +148,7 @@ if [ "$host" = "right-hand" ] ; then for i in www cvs hdw; do if [ -d /chroot/$i ] ; then echo "copying /chroot/$i" - tar .cf ./chroot/$i.tar /chroot/$i + tar -cf ./chroot/$i.tar /chroot/$i fi done fi