On Sat, 23 Aug 2014, Vladimir Mosgalin wrote:

Hi Denice!

On 2014.08.22 at 16:31:42 -0700, Denice wrote next:

This summer our Co-op student, Samuel Lai, wrote a script for us that
implements the systemctl command as a script.  It can be used to manage
many aspects of the init system at SL5 and SL6.

We have made it available at:

  http://grid.triumf.ca/share/

in case you are interested, and you haven't already implemented
your own script.

That was certainly a funny idea! Neat.
Personally I think that using Fedora is better experience in trying
systemd (after all, it has many other aspects like managing system
settings with timedatectl/localectl/hostnamectl/etc instead of files in
/etc/sysconfig, which might not work as before in systemd-based system),
but this is an interesting approach.

For a very long time RHEL-based systems have used service, chkconfig, telinit
for managing the init subsystem.  This change to systemd is a big
change in that sense.  So we thought that pushing the systemd control
utility into the older distributions would ease the pain.

I checked this rpm, no surprises or malicious code (really, I suggest
everyone to check scripts of rpm package and all the files before
installing it when downloading some totally random rpm off the net -
fortunately, it's pretty simple in this case).

As for the actual script, it has problem parsing xinetd-based services.
Check out partial output of chkconfig --list:
wpa_supplicant  0:выкл  1:выкл  2:выкл  3:выкл  4:выкл  5:выкл  6:выкл
xinetd          0:выкл  1:выкл  2:выкл  3:вкл   4:вкл   5:вкл   6:выкл
xl2tpd          0:выкл  1:выкл  2:выкл  3:выкл  4:выкл  5:выкл  6:выкл
ypbind          0:выкл  1:выкл  2:выкл  3:выкл  4:выкл  5:выкл  6:выкл

службы на основе xinetd:
   chargen-dgram:  выкл
   chargen-stream: выкл
   daytime-dgram:  выкл

What we get with systemctl list-unit-files?

wpa_supplicant.service          3:выкл
xinetd.service                  3:вкл
xl2tpd.service                  3:выкл
ypbind.service                  3:выкл
службы.service
chargen-dgram.service
chargen-stream.service
daytime-dgram.service

Obviously it won't be able to manage xinetd services with "service
start/stop" so it might be beter to skip them from output, and
службы.service is a parsing error for trying to parse header of "xinetd
based services". It assumed for some reason that everyone is using
english locale. Duh. It should've set LANG=C if it wants to parse based
on english string!

yes - good point, I'll add the LANG setting in the script.  xinetd has
always been a kludge -- see the man-page on xinetd.  There are 2 'types'
that chkconfig knows about:  'sysv' and 'xinetd'
  $ /sbin/chkconfig --list --type=xinetd
  $ /sbin/chkconfig --list --type=sysv

I modified the script to try to deal with xinetd, and maybe I should have
just left it out.

cheers, etc.
--
deatrich @ triumf.ca, Science/ATLAS         PH: +1 604-222-7665
<*> This moment's fortune cookie:
Death has been proven to be 99% fatal in laboratory rats.

Reply via email to