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.
echo "Starting HAL daemon: /usr/sbin/hald --daemon=yes &"
/usr/sbin/hald --daemon=yes &
rc.M
Note that commenting out some of these may mess things up, but you can run these commands manually. However, I don't see why this has to be done EVERY BOOT.
Code:
# Update the X font indexes:
#if [ -x /usr/bin/fc-cache ]; then
# echo "Updating X font indexes: /usr/bin/fc-cache -f &"
# /usr/bin/fc-cache -f &
#fi
# Update any existing icon cache files:
#if find /usr/share/icons 2> /dev/null | grep -q icon-theme.cache ; then
# for theme_dir in /usr/share/icons/* ; do
# if [ -r ${theme_dir}/icon-theme.cache ]; then
# echo "Updating icon-theme.cache in ${theme_dir}..."
# /usr/bin/gtk-update-icon-cache -t -f ${theme_dir} 1> /dev/null 2> /dev/null &
# fi
# done
# This would be a large file and probably shouldn't be there.
# if [ -r /usr/share/icons/icon-theme.cache ]; then
# echo "Deleting icon-theme.cache in /usr/share/icons..."
#/usr/bin/gtk-update-icon-cache -t -f /usr/share/icons 1> /dev/null 2> /dev/null &
# rm -f /usr/share/icons/icon-theme.cache
# fi
#fi
# These GTK+/pango files need to be kept up to date for
# proper input method, pixbuf loaders, and font support.
#if [ -x /usr/bin/update-gtk-immodules ]; then
# /usr/bin/update-gtk-immodules --verbose
#fi
#if [ -x /usr/bin/update-gdk-pixbuf-loaders ]; then
# /usr/bin/update-gdk-pixbuf-loaders --verbose
#fi
#if [ -x /usr/bin/update-pango-querymodules ]; then
# /usr/bin/update-pango-querymodules --verbose
#fi
rc.S
Code:
# Mount non-root file systems in fstab, but not NFS or SMB
# because TCP/IP is not yet configured, and not proc or sysfs
# because those have already been mounted. Also check that
# devpts is not already mounted before attempting to mount
# it. With a 2.6.x or newer kernel udev mounts devpts.
# We also need to wait a little bit to let USB and other
# hotplugged devices settle (sorry to slow down the boot):
echo "Mounting non-root local filesystems:"
#sleep 3
Of course you can also use the lilo 'compact' option, and compile a new kernel ... but I bet many will not do that.
Anyway, I'll be away on vacation for a while, so I'll see you later
Distribution: Slackware 14 (Server),OpenSuse 13.2 (Laptop & Desktop),, OpenSuse 13.2 on the wifes lappy
Posts: 781
Rep:
I moved the GTK immodules updating into a new file and named it rc.update-gtk, and added a call to it from rc.M. This means I just need to chmod it every now and then to run it.
What I would like to do, and it's a pound to a pinch of salt someone here will tell me how, is to run that script automatically, then to somehow have it tagged as having been run, and avoid running it fot the next X number of boots, where X=some arbitrary number I can assign, maybe via a .conf file of some sort.
Anyone any suggestions?
I moved the GTK immodules updating into a new file and named it rc.update-gtk, and added a call to it from rc.M. This means I just need to chmod it every now and then to run it.
What I would like to do, and it's a pound to a pinch of salt someone here will tell me how, is to run that script automatically, then to somehow have it tagged as having been run, and avoid running it fot the next X number of boots, where X=some arbitrary number I can assign, maybe via a .conf file of some sort.
Anyone any suggestions?
TIA
You could always move the script to one of the cron directories and have cron take care of it for you. That's typically what I do.
Distribution: slackware64 13.37 and -current, Dragonfly BSD
Posts: 1,810
Rep:
Quote:
What I would like to do, and it's a pound to a pinch of salt someone here will tell me how, is to run that script automatically, then to somehow have it tagged as having been run, and avoid running it fot the next X number of boots, where X=some arbitrary number I can assign, maybe via a .conf file of some sort.
You could try this I've just knocked up :
Code:
#!/bin/bash
SCRIPT=${1:-""}
NUMBOOTS=${2:-10}
CONFFLE=${3:- "/etc/boots.count"}
if [ ! -e $CONFFLE ]
then
echo "boots=0" > $CONFFLE
fi
TEST=$(cat $CONFFLE | sed 's/boots=//' )
let TEST+=1
if [ $TEST -gt $NUMBOOTS ]
then
let TEST=$NUMBOOTS
fi
if [ $TEST -eq $NUMBOOTS ]
then
let TEST=0
sh $SCRIPT
fi
echo "boots=$TEST" > $CONFFLE
It's a simple little bash script that takes another script name, number of boots to cycle (optional - defaults to 10), boot count file (optional - defaults to /etc/boots.count) as parameters. You need to save it somewhere (say /etc/rc.d/rc.boots" and make it executable. Then just substitute your call in /etc/rc.d/rc.M with this and the script name to run. So - to run your rc.update.gtk every 20 boot just put this in /etc/rc.d/rc.M
Code:
/etc/rc.d/rc.boots /etc/rc.d/rc.update-gtk 20"
Note that I have just cobbled this together and done very, very little testing and the script itself does no error checking so beware. It just keeps a count in /etc/boots.count but you could supply differing count files for different boot scripts so they maintain their own count files. This is neccesary as each call of the script treates the associated count file as it's own. If you just have the script to run in that command with a cycle number it defaults to ten boot cycles.
Hi,
I've followed the suggestions pointed out in this thread, beside putting in background the start of some daemon I've put part of rc.M into an executable saved in cron.daily like explained by Woodsman obtaining a considerable reduction in boot time. Now I wander if there is a way of knowing if and when this cron's commands are executed … just to be sure that I've done everything properly. Can someone give me instructions?
Last edited by theCapitain; 09-21-2010 at 12:16 PM.
I cut down my boot time on slackware-13.0 by building a monolithic kernel with just the
built-in hardware that's part of my laptop so much so that lsmod returns a blank screen
until I plug something in to a usb port
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.