[Linux-disciples] Where to put startup instructions
Karl Sokol
revkarl at gmail.com
Mon Dec 5 18:32:39 EST 2005
I am running Ubuntu. Whenever I reboot, I have to input the following three
commands.
nahash at ubuntu:~$ sudo chmod 777 /dev/lp0 (the ownership resets on each
reboot making it so noone can print)
nahash at ubuntu:~$ hotkeys (in order to use the fancy-smancy buttons on my
keyboard)
nahash at ubuntu:~$ nahash at ubuntu:~$ sudo modprobe snd_mixer_oss (to use things
like rexima)
Where would the best place to put these so they happen at startup (or in the
case of #1 how can I prevent it from happening in the first place?)
On 5/8/05, Dylan Thurston <dpt at lotus.bostoncoop.net> wrote:
>
> On Sun, May 08, 2005 at 11:45:04AM -0400, Adam Rosi-Kessel wrote:
> > On Sun, May 08, 2005 at 11:33:41AM -0400, Stephen R Laniel wrote:
> > > On Sun, May 08, 2005 at 11:25:59AM -0400, Adam Rosi-Kessel wrote:
> > > > So my guess would be put it in /etc/rcS.d, but I don't know if that
> is
> > > > "canonical."
> > > Just to reclaim a small bit of my Debian Manhood, I was
> > > aware of the /etc/init.d/-and-symlinks bit. But I think it's
> > > a little tricky, because I need to know when /proc is going
> > > to come up; only after it's up can I run the command I'm
> > > looking to run.
> >
> > Note that rcS.d is a little different from rc#.d. I think it's that
> > rcS.d goes before any of the runlevels, but I may be missing some
> > subtlety.
>
> I think rcS.d is also only run on startup/shutdown, not when you
> change runlevels after boot. It's also run when you go into
> single-user mode--only put something there if you want it all the time.
>
> > > So I guess my question was: is there any good general method
> > > for figuring out which of the /etc/rcN.d directories a given
> > > command should go in, or do we have to figure it out in an
> > > ad-hoc way?
> >
> > Well, in Debian we really don't have that many runlevels. There is 0
> > (halt) and 6 (reboot), which aren't relevant here. Then 1 is single user
> > mode, and 2-5 are all the same.
>
> To be clear, this is the situation by default. You can customize this.
>
> > > I should be able to say, for instance, that your (Adam's)
> > > ssh-login-blocker script can only go in after sshd has
> > > started. I specify enough of these constraints ("only go
> > > in after daemon D_1," "only go in before daemon D_2," etc.),
> > > and Unix places the daemon in a position that's consistent
> > > with the constraints I've given (or tells me that my
> > > constraints are impossible to satisfy).
> >
> > Actually, it doesn't matter when ssh_login_blocker starts--it doesn't
> > depend or expect the ssh daemon to be running first. So in this case
> you
> > could start it anytime after the filesystems are mounted.
>
> I guess it should run before /etc/nologin is removed also;
> fortunately, that is run last.
>
> Peace,
> Dylan
>
>
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.4.0 (GNU/Linux)
>
> iD8DBQFCfobgVeybfhaa3tcRAhU7AJ9UyHAxyOmgDR225cWp2Sslap6ViACdEmdL
> zlluG5iPWKuFcx0tF3p9QZg=
> =0eYD
> -----END PGP SIGNATURE-----
>
>
> _______________________________________________
> Linux-disciples mailing list
> Linux-disciples at lists.bostoncoop.net
> http://lists.bostoncoop.net/mailman/listinfo/linux-disciples
>
>
>
--
Grace and Peace,
Karl Sokol
"So mere harmlessness, on which many build their hope of salvation,
was the cause of his damnation!"
-John Wesley's notes
on Matthew 25:30
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.bostoncoop.net/pipermail/linux-disciples/attachments/20051205/cf0f2dcb/attachment.html
More information about the Linux-disciples
mailing list