LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   How to add script on mandriva to restart samba when boot up? (https://www.linuxquestions.org/questions/linux-newbie-8/how-to-add-script-on-mandriva-to-restart-samba-when-boot-up-940349/)

tailinlinux 04-17-2012 09:41 PM

How to add script on mandriva to restart samba when boot up?
 
How to add script on mandriva to restart samba when boot up?

I was wondering how do I make a bash script that automatically restarts samba after all the services are running? The reason I ask is because mandriva 2010.2 has a bug where smb is conflicting with nmbd and if I restart smb at boot it fixes the problem. So I just need it where the system automatically restarts smb. Thank you.

pan64 04-18-2012 02:51 AM

you need to go into /etc/rcX.d and look for samba service. that should be something like this S<number>samba (this is a symbolic link). You can make a copy of it as S99samba2 or whatever and it will try to start smbd again.

tailinlinux 04-18-2012 03:05 AM

Quote:

Originally Posted by pan64 (Post 4655852)
you need to go into /etc/rcX.d and look for samba service. that should be something like this S<number>samba (this is a symbolic link). You can make a copy of it as S99samba2 or whatever and it will try to start smbd again.

There's no /etc/rcX.d file.

pan64 04-18-2012 03:07 AM

you need to replace X with a number, which is your actual runlevel. it is usually 2 or 3, but I'm not sure.

chrism01 04-18-2012 07:08 PM

Normally a major service like that would be defined in /etc/init.d & linked from the relevant startup dir eg /etc/rc3.d

tailinlinux 04-26-2012 02:49 AM

Quote:

Originally Posted by pan64 (Post 4655852)
you need to go into /etc/rcX.d and look for samba service. that should be something like this S<number>samba (this is a symbolic link). You can make a copy of it as S99samba2 or whatever and it will try to start smbd again.

I found S91smb@
is this the one you mention.

pan64 04-26-2012 02:52 AM

yes, probably

tailinlinux 04-26-2012 08:46 PM

Quote:

Originally Posted by pan64 (Post 4663320)
yes, probably

Okay thanks i will try it.

tailinlinux 05-01-2012 10:36 PM

This is not working. Ive tried to copy and rename S91smb to S91smb2
but nothings happen.

pan64 05-02-2012 11:02 AM

would be better to try S99smb2 and also would be nice to look into the log files.


All times are GMT -5. The time now is 07:39 AM.