51 lines
1.1 KiB
Plaintext
51 lines
1.1 KiB
Plaintext
|
#! /bin/sh
|
||
|
# Copyright (c) 2004 SuSE AG, Nuernberg, Germany. All rights reserved.
|
||
|
#
|
||
|
# Author: Mads Martin Joergensen <mmj@suse.de>
|
||
|
#
|
||
|
# /etc/init.d/nfsboot
|
||
|
#
|
||
|
# System startup script for service(s) needed with NFS
|
||
|
#
|
||
|
### BEGIN INIT INFO
|
||
|
# Provides: nfsboot
|
||
|
# Required-Start: $network $portmap
|
||
|
# Required-Stop:
|
||
|
# Default-Start: 3 5
|
||
|
# Default-Stop:
|
||
|
# Description: Service(s) needed with NFS
|
||
|
### END INIT INFO
|
||
|
|
||
|
SMNOTIFYBIN=/sbin/sm-notify
|
||
|
OPTIONS=" -q"
|
||
|
test -x $SMNOTIFYBIN || exit 5
|
||
|
|
||
|
. /etc/rc.status
|
||
|
|
||
|
rc_reset
|
||
|
|
||
|
case "$1" in
|
||
|
# It's a one shot binary notifying clients, so the below is
|
||
|
# ok in this special case.
|
||
|
start|restart|try-restart|reload|force-reload)
|
||
|
echo -n "Starting nfsboot (`/bin/basename $SMNOTIFYBIN`) "
|
||
|
$SMNOTIFYBIN $OPTIONS
|
||
|
rc_status -v
|
||
|
;;
|
||
|
stop)
|
||
|
# we had rc_reset above, so we return 0 anyway
|
||
|
;;
|
||
|
status)
|
||
|
# sm-notify is not a daemon, but a one-shot binary
|
||
|
# nothing to be checked, status is unknown
|
||
|
rc_failed 4
|
||
|
rc_status -v
|
||
|
;;
|
||
|
*)
|
||
|
echo "Usage: $0 {start|stop|restart|try-restart|reload|force-reload|status}"
|
||
|
exit 1
|
||
|
;;
|
||
|
esac
|
||
|
rc_exit
|
||
|
|