Linux - NewbieThis Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place!
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.
it's not Ubuntu
it's Debian and my debian doesn't have upstart. UPDATE
i found out that this problem is only happen for runlevel 1 . if i change my line for runlevel 4 its working.
Code:
time:4:once:/usr/bin/uptime > /home/uptime
can any one tell me why its not working for runlevel 1 ?
As a short followup, what you are doing is fine for testing... but it will not record anything if the system shutdown normally (going to a halt) because it never goes into single user mode - it goes instead to a halt (runlevel 0).
Looking at some code.. it treats "Ss1" the same - and differently than 2-5 (six is another special case)
It looks like it only sets up the console tty... Then it goes through a restart and process the initab (which would start/stop anything needed) but not do anything for single user mode. Now this is based on a fairly quick look, so I could still have overlooked something.
Good question and observations.
The code I'm looking at is sysvinit-2.88dsf. I don't know which exact version your system is using, but I believe it is based on this one.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.