Ncpfs Start and Stop Scripts



Here are to script for starting ncpfs :
Copy one of the startup files into the file /etc/init.d/samba ( normally you must create the samba file )
To configure and setup the script use the follow commands (execute as root):

# chmod 744 /etc/init.d/ncpfs
# ln -s /etc/init.d/ncpfs /etc/init.d/rc3.d/S12ncpfs

# ln -s /etc/init.d/ncpfs /etc/init.d/rc3.d/K08ncpfs

And for the lazy guys create a short cut to contol the samba easy

# ln -s /etc/init.d/ncpfs /sbin/rcncpfs
# chmod 744 /sbin/rcncpfs

Start Ncpfs

Its possible you must change some paths to the programms ipx_configure and ipx_interface

#! /bin/bash
#
# Author: Thonix <http://www.thonix.net>, 2002
#
# /etc/init.d/ncpfs
#

case "$1" in
    start)
        /usr/local/bin/ipx_configure --auto_primary=on
        /usr/local/bin/ipx_interface add eth0 802.2
        ;;
    stop)
        /usr/local/bin/ipx_configure --auto_primary=off
        /usr/local/bin/ipx_interface del 802.2
        ;;
    status)
        /usr/local/bin/ipx_configure
        ifconfig eth0 | grep "IPX/Ethernet" | sed s/"          "//
        ;;
    restart)
        ;;
    *)
        echo "Usage: $0 {start|stop|restart|status}"
        exit 1
esac

Plase give me an Feedback

ver 1.0