diff -Nur old/dchub.init.in new/dchub.init.in --- old/dchub.init.in 2003-10-19 15:32:52.000000000 +0000 +++ new/dchub.init.in 2003-12-13 13:57:03.000000000 +0000 @@ -35,40 +35,26 @@ DCHUB_XMLCONFFILE=$DCHUB_DBDIR/conf.xml DCHUB_XMLUSERFILE=$DCHUB_DBDIR/users.xml DCHUB_HUBPASSFILE=$DCHUB_DBDIR/dchub.hubpasswd -DCHUB_CRCFILE=$DCHUB_DBDIR/dchub.crc +DCHUB_CRCFILE=@DCHUB_CRCDIR@/dchub.crc DCHUB_SCRIPTDIR=$DCHUB_LIBEXECDIR/scripts +DCHUB_PLUGINSDIR=$DCHUB_LIBEXECDIR/plugins DCHUB_MAINSCRIPT=main.pl DCHUB_EXTPROGDIR=$DCHUB_LIBEXECDIR/extprog DCHUB_TOOLSDIR=$DCHUB_LIBEXECDIR/tools -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" +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" -# -# Determine which kind of configuration we're using -# -system=unknown -if [ -f /etc/debian_version ]; then - system=debian -elif [ -f /etc/redhat-release ]; then - system=redhat -else - echo "$0: Unknown system, please report on http://savannah.nongnu.org/support/?group=dchub" 1>&2 - exit 1 -fi - -if [ $system = redhat ]; then - # Source function library. - . $initdir/functions - - # Source networking configuration. - . /etc/sysconfig/network - - # Check that networking is up. - [ ${NETWORKING} = "no" ] && exit 0 - - # Pull in sysconfig settings - [ -f /etc/sysconfig/dchub ] && . /etc/sysconfig/dchub -fi +# Source function library. +. $initdir/functions + +# Source networking configuration. +. /etc/sysconfig/network + +# Check that networking is up. +[ ${NETWORKING} = "no" ] && exit 0 + +# Pull in sysconfig settings +[ -f /etc/sysconfig/dchub ] && . /etc/sysconfig/dchub [ -x "$DCHUB" ] || exit 0 [ -d "$DCHUB_DBDIR" ] || exit 0 @@ -78,7 +64,7 @@ do_init_db() { if [ ! -f $DCHUB_XMLCONFFILE -a ! -f $DCHUB_XMLUSERFILE -a ! -f $DCHUB_HUBPASSFILE -a ! -f $DCHUB_CRCFILE ]; then echo -n $"Initializing the database: " - if $DCHUB --init $OPTIONS >&/dev/null; then + if $DCHUB --init $OPTIONS >/dev/null; then success $"DcHub database creation" echo echo $"You can now log into the hub with the account MASTER"