This file is indexed.

config is in boxbackup-client 0.11.1~r2837-4.

This file is a maintainer script. It is executed when installing (*inst) or removing (*rm) the package.

The actual contents of the file can be viewed below.

  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
#!/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-client/debconf || true
db_go
db_get boxbackup-client/debconf
if [ "$RET" = "false" ]; then
    exit 0
fi

# Backup mode
db_get boxbackup-client/backupMode
OLDMODE=$RET

db_input medium boxbackup-client/backupMode || true
db_go


# accountNumber
ANOK=0
while [ $ANOK = 0 ]; do
    db_input critical boxbackup-client/accountNumber || true
    db_go

    db_get boxbackup-client/accountNumber

    if [ -z `echo $RET | sed 's/[[:xdigit:]]//g'` ]; then
	ANOK=1
    fi

    if [ $ANOK = 0 ]; then
	db_input critical boxbackup-client/incorrectAccountNumber || true
	db_go
    fi
done

# backupServer
db_input critical boxbackup-client/backupServer || true
db_go

# backupDirs
DIRSOK=0
while [ $DIRSOK = 0 ]; do
    db_input critical boxbackup-client/backupDirs || true
    db_go

    db_get boxbackup-client/backupDirs

    if [ ! -z "$RET" ]; then
	DIRSOK=1
	for dir in $RET; do
	    if [ ! -z `echo $dir | sed 's/^[[:space:]]*\/[[:alnum:]\.\_-]*\/*\([[:alnum:]\.\_-]*\/*\)*[[:space:]]*$//g'` ]; then
		DIRSOK=0;
	    fi
	done
    fi

    if [ $DIRSOK = 0 ]; then
	db_input critical boxbackup-client/incorrectDirectories || true
	db_go
    fi
done

# UpdateStoreInterval MinimumFileAge MaxUploadWait
#db_get boxbackup-client/backupMode

# This is a way to get back to the default values when switching the backup mode
#if [ ! -z $OLDMODE ]; then
#    if [ $OLDMODE != $RET ]; then 
#	db_set boxbackup-client/UpdateStoreInterval "3600"
#	db_set boxbackup-client/MinimumFileAge "21600"
#	db_set boxbackup-client/MaxUploadWait "86400"
#    fi
#fi

db_get boxbackup-client/backupMode
if [ "$RET" = "lazy" ]; then
    for param in UpdateStoreInterval MinimumFileAge MaxUploadWait; do
	NUMOK=0
	while [ $NUMOK = 0 ]; do
	    db_input medium boxbackup-client/$param || true
	    db_go

	    db_get boxbackup-client/$param

	    if [ -z `echo $RET | sed 's/[[:digit:]]//g'` ]; then
		NUMOK=1
	    fi

	    if [ $NUMOK = 0 ]; then
		db_input critical boxbackup-client/IncorrectNumber || true
		db_go
	    fi
	done
    done
fi


# NotifyMail
db_input medium boxbackup-client/notifyMail || true
db_go

# x509 and private key
db_input medium boxbackup-client/generateCertificate || true
db_go

exit 0