by Juliet Kemp
This for the "how the hell have I done this job this long & not known this already?" files.
Debian has a file called
/etc/rc.local which runs at the end of all the multi-user boot levels, and which you can therefore put stuff in. I've had trouble with
autofs not starting properly on certain machines (there seems to be a correlation with SCSI or SATA rather than IDE drives, although I do not know why this should be), and putting the line
/etc/rc.local, whilst arguably a hack, does the trick just fine.
Especially baffled that I didn't know of this file because I've had to do stuff like this in the past, and have horribly misused
In totally unconnected, and not even slightly tech-related news: a bunch of my cycling friends are riding 1200km in 90hrs in France this week, for fun. (I was hoping to go as well but didn't qualify - although given the vile weather they've had this might be for the best.) They're all doing fantastically well, especially given the awful conditions, & I've been following their progress all week with much excitement (one person has finished already, in 60hrs!). Finish deadline is 4pm French time tomorrow. Allez allez!
dont u know ppl uses upstart as replacement to sysVinit :?
do u believe the same /etc/rc.local works still?
even for a passwd reset i have to append rw init=/bin/bash to get a # prompt rather than a "1" or "single".just for an update :)
It's not just Debian-based system. That file exists on all Linux systems and most UNIX flavors as well. Slackware and it's derivative distros have it in a slightly different place: /etc/rc.d/rc.local but the functionality is the same.
|So, I am trying to follow directions for running two apt-cacher's by starting one in rc.local. I'm guessing that I simply stuff the same script that is in /etc/init.d into this unassuming little file. However, the README.debian requires command lines for the two separate instances of the apt-cacher daemon. Where do they go?|
Can you write a script to run at logoff or shutdown that unmounts a fused network share that would execute the command: