Changeset 483


Ignore:
Timestamp:
02/22/08 14:19:35 (13 years ago)
Author:
bastiaans
Message:

rpm/init.d/*:

  • cleanup
Location:
trunk/pkg/rpm/init.d
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/pkg/rpm/init.d/jobarchived

    r437 r483  
    1515
    1616RETVAL=0
    17 name=jobarchived
    18 prog=/usr/sbin/jobarchived
    19 desc="Job Archiving Daemon"
     17NAME=jobarchived
     18DAEMON=/usr/sbin/jobarchived
     19DESC="Job Archiving Daemon"
     20
     21PIDFILE=/var/run/$NAME.pid
    2022
    2123OPTIONS=""
    2224
    23 if [ -r /etc/sysconfig/$name ]; then
    24         source /etc/sysconfig/$name
     25if [ -r /etc/sysconfig/$NAME ]
     26        then
     27                source /etc/sysconfig/$NAME
    2528fi
    2629
    2730start() {
    28         echo -n $"Starting $desc: "
    29         daemon $prog -p /var/run/$name.pid $OPTIONS
     31        echo -n $"Starting $DESC: "
     32        daemon $DAEMON --pidfile="$PIDFILE" $OPTIONS
    3033        RETVAL=$?
    3134        echo
    32         [ $RETVAL -eq 0 ] && touch /var/lock/subsys/$name
     35        [ $RETVAL -eq 0 ] && touch /var/lock/subsys/$NAME
    3336        return $RETVAL
    3437}
    3538
    3639stop() {
    37         echo -n $"Stopping $desc: "
    38         killproc $prog
     40        echo -n $"Stopping $DESC: "
     41        killproc $DAEMON
    3942        RETVAL=$?
    4043        echo
    41         [ $RETVAL -eq 0 ] && rm -f /var/lock/subsys/$name
     44        rm -f $PIDFILE
     45        [ $RETVAL -eq 0 ] && rm -f /var/lock/subsys/$NAME
    4246        return $RETVAL
    4347}
     
    5963                ;;
    6064        condrestart)
    61                 [ -e /var/lock/subsys/$name ] && restart
     65                [ -e /var/lock/subsys/$NAME ] && restart
    6266                RETVAL=$?
    6367                ;;
  • trunk/pkg/rpm/init.d/jobmond

    r437 r483  
    1515
    1616RETVAL=0
    17 name=jobmond
    18 prog=/usr/sbin/jobmond
    19 desc="Job Monitoring Daemon"
     17NAME=jobmond
     18DAEMON=/usr/sbin/jobmond
     19DESC="Job Monitoring Daemon"
    2020
     21PIDFILE=/var/run/$NAME.pid
    2122OPTIONS=""
    2223
    23 if [ -r /etc/sysconfig/$name ]; then
    24         source /etc/sysconfig/$name
     24if [ -r /etc/sysconfig/$name ]
     25        then
     26                source /etc/sysconfig/$NAME
    2527fi
    2628
    2729start() {
    28         echo -n $"Starting $desc: "
    29         daemon $prog -p /var/run/$name.pid $OPTIONS
     30        echo -n $"Starting $DESC: "
     31        daemon $DAEMON --pidfile="$PIDFILE" $OPTIONS
    3032        RETVAL=$?
    3133        echo
    32         [ $RETVAL -eq 0 ] && touch /var/lock/subsys/$name
     34        [ $RETVAL -eq 0 ] && touch /var/lock/subsys/$NAME
    3335        return $RETVAL
    3436}
    3537
    3638stop() {
    37         echo -n $"Stopping $desc: "
    38         killproc $prog
     39        echo -n $"Stopping $DESC: "
     40        killproc $DAEMON
    3941        RETVAL=$?
    4042        echo
    41         [ $RETVAL -eq 0 ] && rm -f /var/lock/subsys/$name
     43        rm -f $PIDFILE
     44        [ $RETVAL -eq 0 ] && rm -f /var/lock/subsys/$NAME
    4245        return $RETVAL
    4346}
     
    5962                ;;
    6063        condrestart)
    61                 [ -e /var/lock/subsys/$name ] && restart
     64                [ -e /var/lock/subsys/$NAME ] && restart
    6265                RETVAL=$?
    6366                ;;
Note: See TracChangeset for help on using the changeset viewer.