Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place! |
Notices |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
|
04-17-2012, 09:41 PM
|
#1
|
Member
Registered: Oct 2010
Location: Paudpod, Botolan, Zambales, Philippines
Distribution: Mandriva, Ubuntu, Mint, Open Suse, Meego
Posts: 390
Rep:
|
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.
|
|
|
04-18-2012, 02:51 AM
|
#2
|
LQ Addict
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 22,731
|
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.
|
|
|
04-18-2012, 03:05 AM
|
#3
|
Member
Registered: Oct 2010
Location: Paudpod, Botolan, Zambales, Philippines
Distribution: Mandriva, Ubuntu, Mint, Open Suse, Meego
Posts: 390
Original Poster
Rep:
|
Quote:
Originally Posted by pan64
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.
|
|
|
04-18-2012, 03:07 AM
|
#4
|
LQ Addict
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 22,731
|
you need to replace X with a number, which is your actual runlevel. it is usually 2 or 3, but I'm not sure.
|
|
|
04-18-2012, 07:08 PM
|
#5
|
LQ Guru
Registered: Aug 2004
Location: Sydney
Distribution: Rocky 9.2
Posts: 18,397
|
Normally a major service like that would be defined in /etc/init.d & linked from the relevant startup dir eg /etc/rc3.d
|
|
|
04-26-2012, 02:49 AM
|
#6
|
Member
Registered: Oct 2010
Location: Paudpod, Botolan, Zambales, Philippines
Distribution: Mandriva, Ubuntu, Mint, Open Suse, Meego
Posts: 390
Original Poster
Rep:
|
Quote:
Originally Posted by pan64
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.
|
|
|
04-26-2012, 02:52 AM
|
#7
|
LQ Addict
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 22,731
|
yes, probably
|
|
|
04-26-2012, 08:46 PM
|
#8
|
Member
Registered: Oct 2010
Location: Paudpod, Botolan, Zambales, Philippines
Distribution: Mandriva, Ubuntu, Mint, Open Suse, Meego
Posts: 390
Original Poster
Rep:
|
Quote:
Originally Posted by pan64
yes, probably
|
Okay thanks i will try it.
|
|
|
05-01-2012, 10:36 PM
|
#9
|
Member
Registered: Oct 2010
Location: Paudpod, Botolan, Zambales, Philippines
Distribution: Mandriva, Ubuntu, Mint, Open Suse, Meego
Posts: 390
Original Poster
Rep:
|
This is not working. Ive tried to copy and rename S91smb to S91smb2
but nothings happen.
|
|
|
05-02-2012, 11:02 AM
|
#10
|
LQ Addict
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 22,731
|
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 10:25 AM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|