Systemd service life cycle
Ralf Mardorf
silver.bullet at zoho.com
Wed Apr 13 05:32:11 UTC 2016
Off-topic
On Tue, 12 Apr 2016 17:57:09 +0200, Tom H wrote:
>1) You have a typo (a missing "e")
Oops, thank you.
>2) Why do you have options prepended with "--" and other not?
By force of habit ...
>3) Why do you create an rc.d symlink? Neither Ubuntu nor Arch need it.
... in combination with backwards compatibility and portability.
For command line I prefer "--option" over "option", but services/init
scripts used "start,stop,status" without "--".
rc.d was init.d on Arch Linux, today it's unneeded, but I might still
have some scripts that start audio sessions and run rtirq:
[weremouse at moonstudio ~]$ ls -ld /mnt/archlinux/etc/rc.d
drwxr-xr-x 2 root root 4096 Sep 26 2015 /mnt/archlinux/etc/rc.d
[weremouse at moonstudio ~]$ ls -l /mnt/archlinux/etc/rc.d
total 0
lrwxrwxrwx 1 root root 21 Jul 28 2015 alice -> /usr/local/sbin/alice
lrwxrwxrwx 1 root root 26 Sep 26 2015 alice-dhcp -> /usr/local/sbin/alice-dhcp
lrwxrwxrwx 1 root root 14 Apr 22 2015 rtirq -> /usr/bin/rtirq
Ubuntu still needs init.d and for script portability I linked:
[weremouse at moonstudio ~]$ ls -ld /etc/rc.d
lrwxrwxrwx 1 root root 7 Jul 28 2015 /etc/rc.d -> init.d/
[weremouse at moonstudio ~]$ sudo systemd-nspawn -qD /mnt/archlinux
[sudo] password for weremouse:
Failed to create directory /mnt/archlinux/sys/fs/selinux: Read-only file system
Failed to create directory /mnt/archlinux/sys/fs/selinux: Read-only file system
[root at archlinux ~]# service status rtirq
/usr/local/bin/service: line 3: /etc/rc.d/status: No such file or directory
:D by now habits changed. FWIW "systemctl status rtirq" still isn't the
same as "/path/rtirq status", resp. "service rtirq status".
[root at archlinux ~]# service rtirq status
PID CLS RTPRIO NI PRI %CPU STAT COMMAND
[root at archlinux ~]# rtirq status
PID CLS RTPRIO NI PRI %CPU STAT COMMAND
Regards,
Ralf
More information about the ubuntu-users
mailing list