#!/bin/sh DAEMON=samba DAEMON_LONG_NAME="Samba-smbd" DAEMON_BIN=smbd DAEMON_CONFIG=/mod/etc/samba/smb.conf . /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-smbd -r rc.$DAEMON_BIN -p samba smbd modlib_start $SAMBA_ENABLED ;; unload) modunreg daemon samba smbd 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