script parameters conditional on server boot
I wish to create a script that is called on both boot and when a user logs in. As such, some of the parameters (specifically .config files) will be different depending on whether the machine is booting up or a user is logging in. Is there a means to capture this conditional in my init script?
I do NOT want to use Upstart, for reasons that i will not go into, so please don't suggest this.
So i guess my question is:
is there a boolean, for example, that i can capture which captures the state of the machine i.e. if bootingup = true then do .... else do ....
or alternatively how do i capture the error from logname, i.e. when there is no logname, or no one is logged into the system and use that as the boolean.
any ideas would be very welcome.
Last edited by wimwam; September 25th, 2012 at 02:10 PM.
Reason: an alternative strategy added
Tags for this Thread