Re: rc.d scripts not being run at shutdown.
RW [EMAIL PROTECTED] writes: On Mon, 11 Feb 2008 21:55:28 + RW [EMAIL PROTECTED] wrote: On Mon, 11 Feb 2008 14:19:21 -0500 Lowell Gilbert [EMAIL PROTECTED] wrote: RW [EMAIL PROTECTED] writes: I could imagine screwing-up the operation of rc.shutdown with a syntax error, but I don't see how I could stop it being run at all. As I understand it rc.shutdown is run from init if the file exists. init itself doesn't seem to have been modified recently, so I'm out of ideas. rc.subr and rc.conf will be sourced first, so errors in those could cause problems. That's a good point, but I just tried it with an rc.shutdown script that contains only the touch statement, and the file wasn't touched (and I have tried running the touch manually). I should also add that this problem has survived a world+kernel rebuild to 7.0-RC2, which included the use of mergemaster. All the scripts under /etc should be the ones in the repository. And now I come to think about it, I was tinkering with a random number script at the exact time the entropy file was written-out, and I'm pretty certain I wrote it myself. That means I have no evidence that rc.shutdown has worked at all since I installed FreeBSD 7 in early December. So rcorder isn't being run on rc.d either? Weird; I can't see what could cause that. ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: rc.d scripts not being run at shutdown.
On Mon, 11 Feb 2008 14:19:21 -0500 Lowell Gilbert [EMAIL PROTECTED] wrote: RW [EMAIL PROTECTED] writes: I could imagine screwing-up the operation of rc.shutdown with a syntax error, but I don't see how I could stop it being run at all. As I understand it rc.shutdown is run from init if the file exists. init itself doesn't seem to have been modified recently, so I'm out of ideas. rc.subr and rc.conf will be sourced first, so errors in those could cause problems. That's a good point, but I just tried it with an rc.shutdown script that contains only the touch statement, and the file wasn't touched (and I have tried running the touch manually). I should also add that this problem has survived a world+kernel rebuild to 7.0-RC2, which included the use of mergemaster. All the scripts under /etc should be the ones in the repository. Is anything showing up in the log? No, just that it's rebooting and that syslog is exiting. On the console I see the stuff that follows the rc.shutdown, the diminishing counters etc. ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: rc.d scripts not being run at shutdown.
On Mon, Feb 11, 2008 at 06:06:47PM +, RW wrote: On Sun, 10 Feb 2008 04:02:15 + RW [EMAIL PROTECTED] wrote: Afer putting in some extra logging to check something, I've just noticed that my rc.d scripts are not being run at shutdown. Did you remember to put: # KEYWORD: shutdown in your rc.d scripts? -- Jonathan Chen [EMAIL PROTECTED] -- The reason why worry kills more people than work is that more people worry than work. - Robert Frost ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: rc.d scripts not being run at shutdown.
On Mon, 11 Feb 2008 21:55:28 + RW [EMAIL PROTECTED] wrote: On Mon, 11 Feb 2008 14:19:21 -0500 Lowell Gilbert [EMAIL PROTECTED] wrote: RW [EMAIL PROTECTED] writes: I could imagine screwing-up the operation of rc.shutdown with a syntax error, but I don't see how I could stop it being run at all. As I understand it rc.shutdown is run from init if the file exists. init itself doesn't seem to have been modified recently, so I'm out of ideas. rc.subr and rc.conf will be sourced first, so errors in those could cause problems. That's a good point, but I just tried it with an rc.shutdown script that contains only the touch statement, and the file wasn't touched (and I have tried running the touch manually). I should also add that this problem has survived a world+kernel rebuild to 7.0-RC2, which included the use of mergemaster. All the scripts under /etc should be the ones in the repository. And now I come to think about it, I was tinkering with a random number script at the exact time the entropy file was written-out, and I'm pretty certain I wrote it myself. That means I have no evidence that rc.shutdown has worked at all since I installed FreeBSD 7 in early December. ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: rc.d scripts not being run at shutdown.
RW [EMAIL PROTECTED] writes: On Sun, 10 Feb 2008 04:02:15 + RW [EMAIL PROTECTED] wrote: Afer putting in some extra logging to check something, I've just noticed that my rc.d scripts are not being run at shutdown. By way of confirmation, my entropy file, which is written out by an rc.d script, has not been written to for a week (I shut-down most nights). I don't recall doing anything then. I put a touch on the second line of rc.shutdown, and it never got invoked. I could imagine screwing-up the operation of rc.shutdown with a syntax error, but I don't see how I could stop it being run at all. As I understand it rc.shutdown is run from init if the file exists. init itself doesn't seem to have been modified recently, so I'm out of ideas. rc.subr and rc.conf will be sourced first, so errors in those could cause problems. Is anything showing up in the log? ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: rc.d scripts not being run at shutdown.
On Sun, 10 Feb 2008 04:02:15 + RW [EMAIL PROTECTED] wrote: Afer putting in some extra logging to check something, I've just noticed that my rc.d scripts are not being run at shutdown. By way of confirmation, my entropy file, which is written out by an rc.d script, has not been written to for a week (I shut-down most nights). I don't recall doing anything then. I put a touch on the second line of rc.shutdown, and it never got invoked. I could imagine screwing-up the operation of rc.shutdown with a syntax error, but I don't see how I could stop it being run at all. As I understand it rc.shutdown is run from init if the file exists. init itself doesn't seem to have been modified recently, so I'm out of ideas. ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]
RE: rc.d scripts
-Original Message- From: [EMAIL PROTECTED] [mailto:owner-freebsd- [EMAIL PROTECTED] On Behalf Of Jack Stone Sent: Sunday, March 25, 2007 8:09 AM To: [EMAIL PROTECTED]; [EMAIL PROTECTED] Subject: RE: rc.d scripts From: Tom Grove [EMAIL PROTECTED] To: [EMAIL PROTECTED] Subject: rc.d scripts Date: Fri, 23 Mar 2007 09:15:29 -0400 Does anyone know how to make a script in /etc/rc.d run last? For instance I want dhclient to be the last script in /etc/rc.d/ to run. Any help is much appreciated. -Tom This may have already been answered by others, but I believe just rename the script with a prefix of z for example: zmyscript.sh or zzmyscript to make it very last beyond the first one with a z. It works for me. You might have also noticed that some ports come with number prefixed rc startup scripts. You can prefix your scripts with numbers like: 01_apache.sh 02_mysql.sh 03_pgsql.sh That way you can always adjust the exact order. Best Regards, Rick Apichairuk ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: rc.d scripts
On Sun, 25 Mar 2007 23:03:38 -0400 Kevin Brunelle [EMAIL PROTECTED] wrote: Does anyone know how to make a script in /etc/rc.d run last? For instance I want dhclient to be the last script in /etc/rc.d/ to run. Any help is much appreciated. This may have already been answered by others, but I believe just rename the script with a prefix of z for example: zmyscript.sh or zzmyscript to make it very last beyond the first one with a z. It works for me. I have my suspicions regarding this working as you describe. As the order isn't related to the filename but to the REQUIRE tags inside the file. Correct; dictionary order applies only to old-style local scripts in /usr/local/etc/rc.d. For example, adding a requirement for bgfsck (which was also last on my system when I did this) moved bgfsck down the list... and still left dhclient 4th from last. In fact, it took the addition of: # REQUIRE: bgfsck bsnmpd bridge bluetooth to actually make it the last thing run. And that is not a sure thing either... as soon as the system is updated it is likely to change. Most of the time, when people ask how to run something last, it's because they don't really know when it should run, and just want it pretty late. ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]
RE: rc.d scripts
From: Tom Grove [EMAIL PROTECTED] To: [EMAIL PROTECTED] Subject: rc.d scripts Date: Fri, 23 Mar 2007 09:15:29 -0400 Does anyone know how to make a script in /etc/rc.d run last? For instance I want dhclient to be the last script in /etc/rc.d/ to run. Any help is much appreciated. -Tom This may have already been answered by others, but I believe just rename the script with a prefix of z for example: zmyscript.sh or zzmyscript to make it very last beyond the first one with a z. It works for me. Jack _ Exercise your brain! Try Flexicon. http://games.msn.com/en/flexicon/default.htm?icid=flexicon_hmemailtaglinemarch07 ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: rc.d scripts
Does anyone know how to make a script in /etc/rc.d run last? For instance I want dhclient to be the last script in /etc/rc.d/ to run. Any help is much appreciated. This may have already been answered by others, but I believe just rename the script with a prefix of z for example: zmyscript.sh or zzmyscript to make it very last beyond the first one with a z. It works for me. I have my suspicions regarding this working as you describe. As the order isn't related to the filename but to the REQUIRE tags inside the file. It is actually a non-trivial thing to make something run last. It seems like it should be easy but the system doesn't work that way. For example, adding a requirement for bgfsck (which was also last on my system when I did this) moved bgfsck down the list... and still left dhclient 4th from last. In fact, it took the addition of: # REQUIRE: bgfsck bsnmpd bridge bluetooth to actually make it the last thing run. And that is not a sure thing either... as soon as the system is updated it is likely to change. You could edit /etc/rc and add a skip for dhclient (to prevent it from being run) and then a couple lines to get just it (with rcorder -k) at the very end of /etc/rc to execute it at the very end. You would need to add a keyword declaration in /etc/rc.d/dhclient It's extremely non-standard but if absolutely required, it would work. Or there probably are other ways. Still, the exact order of scripts [under the current system] is not meant to be fixed and static. It is meant to be flexible so things can be added and removed without worry. -Kevin ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: rc.d scripts
On Fri, 23 Mar 2007 09:15:29 -0400 Tom Grove [EMAIL PROTECTED] wrote: Does anyone know how to make a script in /etc/rc.d run last? For instance I want dhclient to be the last script in /etc/rc.d/ to run. Any help is much appreciated. Just have it require the last script, which is bgfsck. ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]