rc.mobile
this is a startup script
mostly aimed at mobile machines which are booted in different places.
It takes a simple config file
that specifies the services desired and any config files to customise.
Typical use prompts for the current location early in the boot sequence.
Also see the manual: rc.mobile.1.html.
It runs startup scripts in parallel which results in significantly faster bootup than the usual sequential startup and has facilities for waiting for prerequisite services where timimg dependencies do exist.
Because it runs the startup files as shipped from your vendor, setup requires very little customisation of your system.
As examples,
here is the /etc/rc.mobile.conf file for my RedHat 9 laptop ``newt'':
rc.mobile.conf-newt,
and for my Fedora Core 2 laptop ``kirsty'':
rc.mobile.conf-kirsty.
Even on newt,
with its 233MHz processor, slow disc and 96MB of RAM,
startup is much faster than the normal sequential startup
of standard machines.
Installation is as follows:
/etc/rc.mobile.conf,newt-rc.mobile.conf] as a template.
rc.mobile from /etc/rc.local
/opt/css/bin/rc.mobile start
to the /etc/rc.local file.
Note: the script prompts for you current location,
offering a choice of all the rc.mobile.conf clauses
whose names start with an @.
The default clause name comes from
from the environment variable $SYSTEMID,
falling back to ``home'' if this is not set.
So if you are usually elsewhere
you may want to make the invocation:
SYSTEMID=where /opt/css/bin/rc.mobile start
setting where to the name of the location clause you would usually use
(without the leading ``@'').
rc.mobile will be starting these
according to your instructions in the /etc/rc.mobile.conf file
the normal service startups should be disabled.
For a RedHat system walk through the startup services listed by:
chkconfig --list | grep :on
making sure that
(a) you want them
and (b) they're named in the rc.mobile.conf file
in the appropriate clauses.
Of course in some locations you will want different services.
For each such service (except for keytable),
add it to the config file
and turn it off in the default startup:
chkconfig --level 2345 service off
where service is the service to disable.
When you're finished the chkconfig(8) command should
look nice and spartan:
[~]@newt*> chkconfig --list | grep :on
keytable 0:off 1:on 2:off 3:off 4:off 5:off 6:off
[~]@newt*>
Isn't that nice!
I left keytable in there for two reasons.
Firstly it seemed one of basics needed to make your console sane.
And secondly when I was testing rc.mobile on an ``up''
laptop with an X11 desktop running
it totally trashed the keyboard mapping.
Had to power cycle!
There are five types of lines in the config file:
/path/to/dir/use clause>svc service...
/etc/init.d/service start
Note: service names must be valid shell identifiers (letters, underscores and digits). If some startup file is not named like that, make a suitably named symlink to it and use that.
need service...services to start up before proceeding.
If they haven't been dispatched already,
dispatch them as with svc.
! shcmd