[SOLVED] Slackware(64) 15.0 - /etc/rc.d/rc.local is not working
SlackwareThis Forum is for the discussion of Slackware Linux.
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.
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.
Dissecting what you're trying to do. Please correct me if I'm misunderstanding your goals here.
The first part of the script tests for internet access before syncing with NTP. Why don't you just use NTP as it was designed? It is trivial to set this up in Slackware. There are two steps:
1. Edit /etc/ntp.conf to remove the hashes (# comment marks) from the beginning of lines 19-22.
2. chmod +x /etc/rc.d/rc.ntpd
This will start the NTP daemon which will sit in the background and wait for a network connection before trying to synchronise your clock. I don't understand why you seem to think you need to complicate it so much?
The second part of the script tests if a remote machine is up and then mounts the CIFS shares from that remote machine. Again, this looks far more complicated than it needs to be. I'd second the notion that you may want to set up AutoFS for this instead.
The third part of the script starts QEMU, and is the only part of your script I'd leave in there:
Quote:
Originally Posted by inukaze
Code:
if [ -x /etc/rc.d/rc.qemu-ga ]; then
# Start QEMU Guest Agent:
echo "Starting QEMU Guest Agent: /etc/rc.d/rc.qemu-ga start"
/etc/rc.d/rc.qemu-ga start
fi
Quote:
Originally Posted by inukaze
With NetworkManager, i need configure the Cisco Switch to use the MAC to get a static ip exclusive for my pc, because the internal DHCP server every time i restart, change the ip.
NetworkManager is somewhat less than ideal for a machine you intend to use as a server. It shines on laptops, netbooks and other devices which are commonly and constantly changing (usually wifi) networks. The problem with NetworkManager, as pointed out above, is that you have to wait for a user to log in to connect to a network... which is pretty useless for a machine you're wanting to use as a server.
To me, it seems like this a machine which should be configured to use a static IP. You can do this using the netconfig script, choosing static IP and following the bouncing ball.
With NetworkManager, i need configure the Cisco Switch to use the MAC to get a static ip exclusive for my pc, because the internal DHCP server every time i restart, change the ip.
I make a internal NTP server with ip 10.48.1.38
Why not simply configure a static IP address in the 10.*-series in your internal network for your computer? Or, if you want to use dhcp, couldn't you use rc.inet1.conf to configure your eth0 to get its address from dhcp? You might need to configure your internal dhcp server to reserve some addresses for static ip addresses unless you want dhcp for all your machines.
I haven't used NetworkManager myself, but isn't it possible to configure NetworkManager to initialize your network at boot instead of waiting for a logged in user to configure the network?
Replace the echo "OK" for your code and the echo "NOK" for an appropriate error message.
Don't worry about adjusting the timeout 10 to something larger like 30 seconds or several minutes, as the script proceeds as soon as ping gets through, not at the end of the timeout.
Initially I had a sleep command but this is better (for me)
Ok, now is solved, just configuring it to use static ip, and during boot the internet access works. using NetworkManager the system wait until the Graphical Session and user session start to activate the internet access, and that was all issue.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.