I am running on an AIX 5.3 platform and I am looking to see if anybody has a script similar to this (see below) that will work under AIX.
My goal is, on boot up I want to have samba started automatically. Can somebody let me what I have to do (on AIX) for this to happen.
#!/bin/sh
#
# /etc/rc.d/init.d/smb - starts and stops SMB services.
#
# The following files should be synbolic links to this file:
# symlinks: /etc/rc.d/rc1.d/K35smb (Kills SMB services on shutdown)
# /etc/rc.d/rc3.d/S91smb (Starts SMB services in multiuser mode)
# /etc/rc.d/rc6.d/K35smb (Kills SMB services on reboot)
#
# Source function library.
. /etc/rc.d/init.d/functions
# Source networking configuration.
. /etc/sysconfig/network
# Check that networking is up.
[ ${NETWORKING} = "no" ] && exit 0
# See how we were called.
case "$1" in
start)
echo -n "Starting SMB services: "
daemon smbd -D
daemon nmbd -D
echo
touch /var/lock/subsys/smb
;;
stop)
echo -n "Shutting down SMB services: "
killproc smbd
killproc nmbd
rm -f /var/lock/subsys/smb
echo ""
;;
*)
echo "Usage: smb {start|stop}"
exit 1
esac
_________________________________________________________________
Microsoft brings you a new way to search the web. Try Bing™ now
http://www.bing.com?form=MFEHPG&publ=WLHMTAG&crea=TEXT_MFEHPG_Core_tagline_try bing_1x1--
To unsubscribe from this list go to the following URL and read the
instructions: https://lists.samba.org/mailman/options/samba
VERSION=`ls /opt/pware/samba|sort|tail -n 1`
/opt/pware/samba/${VERSION}/sbin/nmbd -D
/opt/pware/samba/${VERSION}/sbin/smbd -D
Which is called in /etc/inittab to start up Samba on boot ... nothing fancy :-)
All:
#!/bin/sh
_________________________________________________________________
Microsoft brings you a new way to search the web. Try Bing(tm) now
We start it from the /etc/rc.tcpip script.
--
Tim Evans, TKEvans.com, Inc. | 5 Chestnut Court
UNIX System Admin Consulting | Owings Mills, MD 21117
http://www.tkevans.com/ | 443-394-3864
http://www.come-here.com/News/ | tke...@tkevans.com
You can try the following (from several sources)
/usr/bin/mkssys -s nmbd -p /opt/pware/sbin/nmbd -a '-F -s /opt/pware/lib/smb.conf' -u 0 -S -n 15 -f 9 -R -G samba
/usr/bin/mkssys -s smbd -p /opt/pware/sbin/smbd -a '-F -s /opt/pware/lib/smb.conf' -u 0 -S -n 15 -f 9 -R -G samba
/usr/bin/mkssys -s smbd -p /opt/pware/sbin/winbindd -a '-F -s /opt/pware/lib/smb.conf' -u 0 -S -n 15 -f 9 -R -G samba
This gives you the ability to do::
startsrc -s smbd
stopsrc -s winbindd
stopsrc -g samba
startsrc -g samba
Assuming, of course, that you want to use the IBM way of managing daemons with SRC.
Then you could add "startsrc -g samba" to inittab like:
samba:2:once:/usr/bin/startsrc -g samba >/dev/console 2>&1
This can be done with:
mkitab "samba:2:once:/usr/bin/startsrc -g samba >/dev/console 2>&1"
Just some thoughts...
Cheers,
Bill
> We start it from the /etc/rc.tcpip script.
--