Operating System - HP-UX
1753696 Members
5779 Online
108799 Solutions
New Discussion юеВ

Re: Samba adding to runlevel and configuration

 
Umapathy S
Honored Contributor

Samba adding to runlevel and configuration

hi
I installed samba which I got from hpux porting center of utah.edu on a hpux11.0.
I have experience in configuring samba on a linux box.
I want to add samba it to the 3rd runlevel. I found no startup scripts for samba.

thanks for your time and hints

cheers
Umapathy
Arise Awake and Stop NOT till the goal is Reached!
3 REPLIES 3
Dayanand Naik
Frequent Advisor

Re: Samba adding to runlevel and configuration

Hi,

Check the attached file, which give you a discription on configuration of Samba. Its very simple. I have also attached the startup scripts. After adding it you can create a link for running it in the 3rd run level.

Hope this helps...

Cheers & Regards,
Dayanand Naik.
Dayanand Naik
SANGKYU_LEE
New Member

Re: Samba adding to runlevel and configuration

hi.
1. creat samba start/stop script /sbin/init.d
ex) vi /sbin/init.d/samba

PATH=/sbin:/usr/sbin:/usr/bin
export PATH

rval=0
set_return() {
x=$?
if [ $x -ne 0 ]; then
echo "ERROR CODE $x"
rval=1
fi
}


case $1 in
start_msg)
echo "Start samba daemon"
;;

stop_msg)
echo "Stopping samba daemon"
;;

'start')
/opt/samba/bin/smbd -D
/opt/samba/bin/nmdb -D
rval=2
;;

'stop')
pid=`ps -ef|grep smbd|awk '{print $2}'`
pid2=`ps -ef|grep nmbd|awk '{print $2}'`
kill -9 $pid $pid2

*)
echo "usage: $0 {start|stop}"
;;
esac

exit $rval

2. link
ln -s /sbin/init.d/samba /sbin/rc3.d/S900samba


sorry. I little speak English..
have a nice day...
Michael Tully
Honored Contributor

Re: Samba adding to runlevel and configuration

Hi,

You should only run the samba startup
from your last run-level. This can be
found in your /etc/inittab file on the
first line. So if your default run
level is 4 the startup script should
be /sbin/rc.4.d and the shutdown in
/sbin/rc3.d

-Michael
Anyone for a Mutiny ?