solaris 10
logged in as root to command line...want to shut the system down....could not do this....when i chose shutdown the system seemed to squawk at me saying i'd lose whatever i was working on would be lost unless i logged out...after proceeding through this it took me to the gui log in... (6 Replies)
Hi all
i want to list out all command line arguments except $1 i have passed to a script.
Ex: sh cmdline.sh one two three four five
o/p:
two three four five (3 Replies)
I'm new to Unix and I'm looking for some assistance. We have 20 different accounts we must login to every day. Logging in has become quite the chore and most nights, we have to log out. I'm looking for a way to simply copy and paste the commands into each window to make things easier.
I have been... (2 Replies)
Hi all,
I am OpenBSD newbie and currently need to manage some OpenBSD firewalls running pf. The OpenBSD version is 4.8
As the other sys admins are not so familiar with OpenBSD, so I have an idea across in my mind on how to minimize the root account usage and other unnecessary access and make... (9 Replies)
I would like to search and print a match of the user entered $ARGV.
Im terrible with hashes and really dont know where to go from here.
The example data file
name location phone
Bugs holeintheground 5551212
Woody holeinthetree 6661313
Jerry holeinthewall 7771414... (4 Replies)
OS : RHEL / Oracle Linux 6.8
In bash shell, how can I replace a character under the cursor with another character ?
In the below example , after I typed the following line, I realized that I meant 7013 and not 2013. So I move the cursor to the left and keep it on top of 2 (of 2013) and I want... (7 Replies)
Discussion started by: kraljic
7 Replies
LEARN ABOUT CENTOS
sd_booted
SD_BOOTED(3) sd_booted SD_BOOTED(3)NAME
sd_booted - Test whether the system is running the systemd init system
SYNOPSIS
#include <systemd/sd-daemon.h>
int sd_booted(void);
DESCRIPTION
sd_booted() checks whether the system was booted up using the systemd init system.
RETURN VALUE
On failure, this call returns a negative errno-style error code. If the system was booted up with systemd as init system, this call returns
a positive return value, zero otherwise.
NOTES
This function is provided by the reference implementation of APIs for new-style daemons and distributed with the systemd package. The
algorithm it implements is simple, and can easily be reimplemented in daemons if it is important to support this interface without using
the reference implementation.
Internally, this function checks whether the directory /run/systemd/system/ exists. A simple check like this can also be implemented
trivially in shell or any other language.
For details about the algorithm check the liberally licensed reference implementation sources:
http://cgit.freedesktop.org/systemd/systemd/plain/src/libsystemd-daemon/sd-daemon.c and
http://cgit.freedesktop.org/systemd/systemd/plain/src/systemd/sd-daemon.h
sd_booted() is implemented in the reference implementation's sd-daemon.c and sd-daemon.h files. These interfaces are available as a shared
library, which can be compiled and linked to with the libsystemd-daemon pkg-config(1) file. Alternatively, applications consuming these
APIs may copy the implementation into their source tree. For more details about the reference implementation, see sd-daemon(3).
If the reference implementation is used as drop-in files and -DDISABLE_SYSTEMD is set during compilation, this function will always return
0 and otherwise become a NOP.
SEE ALSO systemd(1), sd-daemon(3)systemd 208SD_BOOTED(3)