#!/bin/sh DAEMON=samba DAEMON_LONG_NAME="Samba-nmbd" DAEMON_BIN=nmbd DAEMON_CONFIG=/mod/etc/samba/smb.conf CONF_ENABLED=SAMBA_NMBD_ENABLED . /etc/init.d/modlibrc config() { /mod/etc/init.d/rc.samba config } start() { modlib_startdaemon $DAEMON_BIN -D -s $DAEMON_CONFIG } case $1 in ""|load) if [ ! -e /var/mod/etc/init.d/rc.$DAEMON_BIN ]; then ln -s /etc/init.d/rc.$DAEMON_BIN /var/mod/etc/init.d/rc.$DAEMON_BIN fi modreg daemon -n samba-nmbd -r rc.$DAEMON_BIN -p samba nmbd modlib_start $SAMBA_NMBD_ENABLED ;; unload) modunreg daemon samba nmbd modlib_stop ;; start) modlib_start ;; stop) modlib_stop ;; restart) modlib_restart ;; reload) modlib_reload ;; status) modlib_status ;; config) config ;; *) echo "Usage: $0 [load|unload|start|stop|restart|reload|status|config]" 1>&2 exit 1 ;; esac exit 0