summaryrefslogtreecommitdiff
path: root/debian/boxbackup-server.config
diff options
context:
space:
mode:
authorReinhard Tartler <siretart@tauware.de>2008-01-19 15:05:28 +0100
committerReinhard Tartler <siretart@tauware.de>2008-01-19 15:05:28 +0100
commit1d56581c644c53f1b9a182c6574bc2fc5243d4d1 (patch)
tree7f75e499dd2c98eee7d4ba919aad8783063ef541 /debian/boxbackup-server.config
parentaa2943800f9c00823720af98da036813ebf5cd2c (diff)
Import of boxbackup 0.10
This is actually a quite funny commit: I had started my packaging branch in a strange way: I did not start from a clean tarball, but used an existing packaging directory as starting place. This makes upgrading to a new upstream hard. So I branched revision 1, and 'bzr import'ed the Upstream tarball of version 0.10 over it. The upstream tarball version I used for this commit has the md5sum: 2dc02d87932fdb222ed019443ddcf444
Diffstat (limited to 'debian/boxbackup-server.config')
-rw-r--r--debian/boxbackup-server.config114
1 files changed, 0 insertions, 114 deletions
diff --git a/debian/boxbackup-server.config b/debian/boxbackup-server.config
deleted file mode 100644
index 0d46f6ec..00000000
--- a/debian/boxbackup-server.config
+++ /dev/null
@@ -1,114 +0,0 @@
-#!/bin/bash -e
-
-# Source debconf library
-. /usr/share/debconf/confmodule
-
-# This conf script is capable of backing up
-#db_version 2.0
-#db_capb backup
-
-#db_metaget debconf/priority value
-#CONFPRIO=$RET
-
-# Handle with debconf or not?
-db_input medium boxbackup-server/debconf || true
-db_go
-db_get boxbackup-server/debconf
-if [ "$RET" = "false" ]; then
- exit 0
-fi
-
-# RAID directories
-db_get boxbackup-server/raidDirectories
-OLDRAIDDIR=$RET
-RAIDOK=0
-while [ $RAIDOK = 0 ]; do
- db_input medium boxbackup-server/raidDirectories || true
- db_go
-
- db_get boxbackup-server/raidDirectories
-
- DIR1=`echo "$RET" | awk '{ print $1 }'`
- DIR2=`echo "$RET" | awk '{ print $2 }'`
- DIR3=`echo "$RET" | awk '{ print $3 }'`
-
- if [ -n $DIR1 ]; then
- if [ -z $DIR2 -o -z $DIR3 ]; then
- DIR2=$DIR1
- DIR3=$DIR1
- fi
-
- PATHOK=1
- for i in $DIR1 $DIR2 $DIR3; do
- if [ `echo $i | awk '{ if (/^\/[A-Za-z0-9\.\-_]+\/?([A-Za-z0-9\.\-_]+\/?)*$/) { print 1 } else { print 0 } }'` = 0 ]; then
- PATHOK=0
- fi
- done
-
- if [ $PATHOK = 1 ]; then
- RAIDOK=1;
- fi
- fi
-
- if [ $RAIDOK = 0 ]; then
- db_input critical boxbackup-server/incorrectDirectories || true
- db_go
- fi
-done
-
-# RAID block size
-# Try to figure out the block size of the first partition given
-db_get boxbackup-server/raidDirectories
-if [ "$OLDRAIDDIR" != "$RET" ]; then # Directories have been changed so we can try to guess the block size
- TMPDIR=`echo $DIR1 | sed 's/\/$//'`
-
- while [ "$TMPDIR" != "" ]; do
- DEV=`df -P | grep "$TMPDIR$" | awk '{ print $1 }'`
-
- if [ -z "$DEV" ]; then
- TMPDIR=`echo $TMPDIR | sed 's/\/[^\/]*$//'`
- else
- TMPDIR=""
- fi
- done
-
- if [ "$DEV" != "" ]; then
- if [ -x /sbin/tune2fs ]; then
- BS=`/sbin/tune2fs -l $DEV 2>/dev/null | grep 'Block size' | awk '{print $3 }'`
-
- if [ $? = 0 -a $BS != "" ]; then
- db_set boxbackup-server/raidBlockSize "$BS"
- fi
- fi
- fi
-fi
-
-BSOK=0
-while [ $BSOK = 0 ]; do
- db_input medium boxbackup-server/raidBlockSize || true
- db_go
-
- db_get boxbackup-server/raidBlockSize
-
- if [ `echo $RET | awk '{ if (/^[0-9]+$/) { print 1 } else { print 0 } }'` = 1 ]; then
- if [ `echo $RET | awk '{ bs=sqrt($1); if (bs ~ /^[0-9]+$/) { print 1 } else { print 0 } }'` = 1 ]; then
- BSOK=1
- fi
- fi
-
- if [ $BSOK = 0 ]; then
- db_input critical boxbackup-server/incorrectBlocksize || true
- db_go
- fi
-done
-
-# x509 and private key
-db_input medium boxbackup-server/generateCertificate || true
-db_go
-
-# Display general info
-db_input medium boxbackup-server/generalInfo || true
-db_go
-
-exit 0
-