Skip to content
Advertisement

Demon function on RHEL 7

I have script in RHEL 6 which is using default function such as /etc/rc.d/init.d/functions

if [ -f /etc/rc.d/init.d/functions ]; then
    # redhat flavor
    . /etc/rc.d/init.d/functions
    start_cmd="daemon --pidfile $pidfile --user $USER"
else
    echo "Unable to find function library" 1>&2
    exit 1
fi

can we use same functions on RHEL 7 to start the daemon process? . Also let me know, if there is any difference for /etc/rc.d/ between RHEL 6 and RHEL 7?

Advertisement

Answer

This file is provided by the initscripts package, which isn’t included by default in the RHEL-7 image. It is however in the RHEL6 image.

In el6, it’s brought in as a dependency for iproute and iputils, where in el7, systemd meet this need.

User contributions licensed under: CC BY-SA
5 People found this is helpful
Advertisement