1 diff -Nur old/dchub.init.in new/dchub.init.in
2 --- old/dchub.init.in 2003-10-19 15:32:52.000000000 +0000
3 +++ new/dchub.init.in 2003-12-13 13:57:03.000000000 +0000
5 DCHUB_XMLCONFFILE=$DCHUB_DBDIR/conf.xml
6 DCHUB_XMLUSERFILE=$DCHUB_DBDIR/users.xml
7 DCHUB_HUBPASSFILE=$DCHUB_DBDIR/dchub.hubpasswd
8 -DCHUB_CRCFILE=$DCHUB_DBDIR/dchub.crc
9 +DCHUB_CRCFILE=@DCHUB_CRCDIR@/dchub.crc
10 DCHUB_SCRIPTDIR=$DCHUB_LIBEXECDIR/scripts
11 +DCHUB_PLUGINSDIR=$DCHUB_LIBEXECDIR/plugins
12 DCHUB_MAINSCRIPT=main.pl
13 DCHUB_EXTPROGDIR=$DCHUB_LIBEXECDIR/extprog
14 DCHUB_TOOLSDIR=$DCHUB_LIBEXECDIR/tools
16 -OPTIONS="--UID=$DCHUB_UID --conf=$DCHUB_XMLCONFFILE --user=$DCHUB_XMLUSERFILE --hubpasswd=$DCHUB_HUBPASSFILE --crc=$DCHUB_CRCFILE --pscriptdir=$DCHUB_SCRIPTDIR --pscriptinit=$DCHUB_MAINSCRIPT --exprogdir=$DCHUB_EXTPROGDIR --logfile=$DCHUB_LOGFILE"
17 +OPTIONS="--UID=$DCHUB_UID --conf=$DCHUB_XMLCONFFILE --user=$DCHUB_XMLUSERFILE --hubpasswd=$DCHUB_HUBPASSFILE --crc=$DCHUB_CRCFILE --pscriptdir=$DCHUB_SCRIPTDIR --linkdir=$DCHUB_PLUGINSDIR --pscriptinit=$DCHUB_MAINSCRIPT --exprogdir=$DCHUB_EXTPROGDIR --logfile=$DCHUB_LOGFILE"
20 -# Determine which kind of configuration we're using
23 -if [ -f /etc/debian_version ]; then
25 -elif [ -f /etc/redhat-release ]; then
28 - echo "$0: Unknown system, please report on http://savannah.nongnu.org/support/?group=dchub" 1>&2
32 -if [ $system = redhat ]; then
33 - # Source function library.
34 - . $initdir/functions
36 - # Source networking configuration.
37 - . /etc/sysconfig/network
39 - # Check that networking is up.
40 - [ ${NETWORKING} = "no" ] && exit 0
42 - # Pull in sysconfig settings
43 - [ -f /etc/sysconfig/dchub ] && . /etc/sysconfig/dchub
45 +# Source function library.
48 +# Source networking configuration.
49 +. /etc/sysconfig/network
51 +# Check that networking is up.
52 +[ ${NETWORKING} = "no" ] && exit 0
54 +# Pull in sysconfig settings
55 +[ -f /etc/sysconfig/dchub ] && . /etc/sysconfig/dchub
57 [ -x "$DCHUB" ] || exit 0
58 [ -d "$DCHUB_DBDIR" ] || exit 0
61 if [ ! -f $DCHUB_XMLCONFFILE -a ! -f $DCHUB_XMLUSERFILE -a ! -f $DCHUB_HUBPASSFILE -a ! -f $DCHUB_CRCFILE ]; then
62 echo -n $"Initializing the database: "
63 - if $DCHUB --init $OPTIONS >&/dev/null; then
64 + if $DCHUB --init $OPTIONS >/dev/null; then
65 success $"DcHub database creation"
67 echo $"You can now log into the hub with the account MASTER"