dh2k Posted November 27, 2006 Report Share Posted November 27, 2006 I have stumbled upon a really neat way of getting Mandriva/Linux to boot within 30secs from selecting the OS in LILO to login prompt. Goes like this: backup /etc/rc.d/rc5.d/ directory cp /etc/rc.d/rc5.d /etc/rc.d/rc5~.d Only startup link to script in new rc5.d directory I have is: ALSA (for sound) xfs (for x server fonts) dm (for graphical login) All the other default links to startup scripts in backed up rc5~.d directory are then copied and pasted from terminal output to a shell script named /root/admin-scripts/rc5.sh (made executable): ls /etc/rc.d/rc5.d In gedit, <ctrl + r> to replace "@" with "" (nothing) add at beginning of script: #! /bin/sh cd /etc/rc.d/rc5.d then simply amend " start" next to each script link e.g. Sxxshorewall start Reboot and watch your system boot in double quicktime. My only gripe is that after logging into Gnome (or KDE) whenever any of the other default services need starting I can only start them as root by running the script /root/admin-scripts/rc5.sh Ideally I would like to add the script /root/admin-scripts/rc5.sh whenever a session is started but because of permissions I cannot do this. Does anyone know how to hack round this problem? In short, how can the /root/admin-script/rc5.sh that requires root permission and root priviledges be executed after logging in? [moved from Software by spinynorman] Quote Link to comment Share on other sites More sharing options...
ianw1974 Posted November 27, 2006 Report Share Posted November 27, 2006 I'd put the remaining ones in /etc/rc.local and call the remaining services from there. Then they'll start in the background behind the gui loading. Quote Link to comment Share on other sites More sharing options...
dh2k Posted November 27, 2006 Author Report Share Posted November 27, 2006 rc.local loads at boot time after rc5. What I really want is my Desktop (Gnome) to load up first so I can load other (background) services while Gnome is ready to use. I suppose this would look like this, from selecting the OS in LILO: init5 (ALSA, XFS, DM) rc.local (empty) then login - using GDM/KDM login completes and Desktop is ready sytem then runs the /root/admin-scripts/rc5.sh script Quote Link to comment Share on other sites More sharing options...
ianw1974 Posted November 27, 2006 Report Share Posted November 27, 2006 On my systems, rc local is loading, but I can login to the desktop no problems while all of this is starting. What you're asking is for the script to run after the user has logged in. Therefore the script would have to be ran by the user, and therefore you'd have to give them the appropriate privileges to do such a thing (such as root with sudo). Otherwise, you'll have to do it in the background while the user is logging in by using rc.local. And since rc.local is doing all this behind the scenes anyway, the user won't realise, as they'll be entering their username/password anyway without realising something else is happening in the background. I've never found it to run rc.local before giving me the gui. I've even found with no gui and just console access, I get a login prompt before rc.local has started/finished processing. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.