From 2ef9893366075fdc102f7ba896e8a1ea1b22f828 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Jan=20R=C4=99korajski?= Date: Thu, 22 Mar 2007 01:02:01 +0000 Subject: [PATCH] - sanitize options, there is only a few of them - removed RQUOTADOPTIONS from sysconfig file, will be removed in future from init script Changed files: rquotad.init -> 1.15 rquotad.sysconfig -> 1.3 --- rquotad.init | 19 ++++++++++--------- rquotad.sysconfig | 9 ++++++--- 2 files changed, 16 insertions(+), 12 deletions(-) diff --git a/rquotad.init b/rquotad.init index 9114291..67d2ae1 100644 --- a/rquotad.init +++ b/rquotad.init @@ -33,20 +33,21 @@ if [ -x /sbin/pidof ] && [ "$1" != "stop" ] && [ -z "`/sbin/pidof portmap`" ]; t exit 0 fi -# Sanity checks - -if is_yes "$REMOTE_QUOTA_SETTING"; then - RQUOTADOPTIONS="$RQUOTADOPTIONS --setquota" -else - RQUOTADOPTIONS="$RQUOTADOPTIONS --no-setquota" -fi - start() { # Check if the service is already running? if [ ! -f /var/lock/subsys/rquotad ]; then + # RQUOTADOPTIONS will be removed in the future + OPTIONS="$RQUOTADOPTIONS" + [ -n "$RQUOTAD_PORT" ] && OPTIONS="$OPTIONS -p $RQUOTAD_PORT" + is_yes "$AUTOFS" && OPTIONS="$OPTIONS --autofs" + if is_yes "$REMOTE_QUOTA_SETTING"; then + OPTIONS="$OPTIONS --setquota" + else + OPTIONS="$OPTIONS --no-setquota" + fi # Start daemons. msg_starting "NFS quotas" - daemon rpc.rquotad $RQUOTADOPTIONS + daemon rpc.rquotad $OPTIONS RETVAL=$? [ $RETVAL -eq 0 ] && touch /var/lock/subsys/rquotad else diff --git a/rquotad.sysconfig b/rquotad.sysconfig index d7b58a7..bfca73a 100644 --- a/rquotad.sysconfig +++ b/rquotad.sysconfig @@ -2,7 +2,10 @@ SERVICE_RUN_NICE_LEVEL="+0" # Allow remote quota setting -REMOTE_QUOTA_SETTING=no +#REMOTE_QUOTA_SETTING="no" -# Options for rquotad -RQUOTADOPTIONS="" +# Do not ignore autofs mountpoints +#AUTOFS="yes" + +# Port rquotad should listen on (default is portmap assigned) +#RQUOTAD_PORT= -- 2.44.0