[Samba] AIX starting and stopping samba from command line

Lund, Claus Claus.Lund at state.vt.us
Fri Jun 19 13:59:19 GMT 2009


We just have a script like this:

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  :-)



-----Original Message-----
From: samba-bounces+claus.lund=state.vt.us at lists.samba.org [mailto:samba-bounces+claus.lund=state.vt.us at lists.samba.org] On Behalf Of BeefStu BeefStu
Sent: Friday, June 19, 2009 9:34 AM
To: samba at lists.samba.org
Subject: [Samba] AIX starting and stopping samba from command line


All:

 

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(tm) 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


More information about the samba mailing list