Service in Novell SUSE/ SLES/ NLD
I keep bumping up against small differences between Linux distros, and it kind of drives me a crazy. For example, I’m spoiled by service in the Redhat distros. You can query the status of any service in /etc/init.d.
# service syslog statussyslogd (pid 2106) is running...klogd (pid 2110) is running...# service httpd statushttpd (pid 26830 26829 26828 26827 26826) is running...#
You can’t do that in the Novell distros of Linux (NLD, SLES, SUSE Pro) that I’ve seen…
Until now! I came across this handy script on Novell’s site, that’ll let you to enjoy the service experience.
#!/bin/bash#/usr/sbin/service if [ $USER != "root" ]thenecho "Must be in a root login shell to run $0"exitfi if [ $# -lt 2 ]thenecho "Usage: $0 service_name stop/start/restart/status"exitfi set -e/etc/init.d/$1 $2