The upstart package that provides initctl command also provides following other commands: start, stop, status etc
These commands are all present in /sbin/ in Redhat systems. We can see that status, start, stop, restart are all symlinks to initctl. How do they still work differently? For example to check the status of a job, we can do:
We can also do
How is that status command works differently when it is a symlink to initctl?
Thanks
RC
Moderator's Comments:
Please use CODE tags as required by forum rules!
Last edited by rbatte1; 10-04-2016 at 05:46 AM..
Reason: Add CODE and ICODE tags.
The upstart package that provides initctl command also provides following other commands: start stop status etc
These commands are all present in /sbin/ in Redhat systems. We can see that status, start, stop, restart are all symlinks to initctl. How do they still work differently? For example to check the status of a job, we can do:
We can also do
How is that status command works differently when it is a symlink to initctl?
Thanks
RC
Moderator's Comments:
Please use CODE tags as required by forum rules!
When you exec a program, the name of the file executed (and it doesn't matter if this is a symbolic link or a hard link) typically appears as the "zeroth" argument to the program when it starts running. If the program is a shell script for a shell that is based on Bourne shell syntax, that value can be referenced in the script by the expansion of positional parameter 0 (i.e., $0). If you are in a C program where the entry to main is conventionally through the function main with a function prototype similar to:
you could access it in main() by looking at argv[0].
In either case, if the zeroth argument's last pathname component is initctl, the action to be performed is determined by the 1st argument; otherwise, the last pathname component of the zeroth argument is the action to be performed.
This User Gave Thanks to Don Cragun For This Post:
Hi...
This is message that occurs when i am trying to shutdown the linux system
timeout opening writing control channel /dev/initctl
how can i shutdown what is the problem here..
Thanks in advance
... (2 Replies)