I quickly grepped through /etc/init.d/* files (I know systemd does
not use these anymore excepted when there is no unit and it calls
some of these scripts).  There are many files that set a PATH explicitly
and which starts whith /usr/local/s?bin:

        $ grep -l PATH=/usr/local/ /etc/init.d/*
        /etc/init.d/alsa-utils
        /etc/init.d/alsa-utils.dpkg-dist
        /etc/init.d/binfmt-support
        /etc/init.d/busybox-klogd
        /etc/init.d/busybox-syslogd
        /etc/init.d/cpufrequtils
        /etc/init.d/cups
        /etc/init.d/hddtemp
        /etc/init.d/mcelog
        /etc/init.d/network-manager
        /etc/init.d/saned
        /etc/init.d/sysstat
        /etc/init.d/unattended-upgrades

There is a /etc/init.d/alsa-utils.dpkg-dist because I modified the
/etc/init.d/alsa-utils (suppressing whatever it was doing at "stop"
time) because it was hanging up shutdowns and forced me to "reset",
with filesystems not cleanly unmounted at that point.

Now I do not know where all the systemd units are stored but I ran
this:

        $ find /lib/systemd/system/* -type f | xargs grep /usr/local
        
/lib/systemd/system/systemd-binfmt.service:ConditionDirectoryNotEmpty=|/usr/local/lib/binfmt.d
        
/lib/systemd/system/systemd-modules-load.service:ConditionDirectoryNotEmpty=|/usr/local/lib/modules-load.d

Are there other locations for units used at boot time?

I tried to look at these files, but all I see there are variable
declarations, no logic, so it's hard to understand how these things
are used.  At least with /etc/init.d scripts, I could patch things
that caused problems but with systemd I feel as powerless as in front
of a Windows system that would exhibit problems!

Anyway, if autofs is indeed not up when /usr/local is accessed, no
damage because there is nothing there.  However if autofs is up and
is having problems contacting the server (which was always there and
up during my tests), then indeed we could have a lockup.

To analyse the way systemd launches the processes, I assumed PIDs
would be created in sequence, so I ran:

        $ systemctl status | \
                perl -n \
                        -e '$ok = 1 if m|-1\s+/sbin|; next unless $ok;' \
                        -e '/[`|]-(\d+)\s(.*)/ && print "$1 $2\n"' | \
                sort -n

Which gave me this:

1 /sbin/init
441 /lib/systemd/systemd-journald
444 /sbin/lvmetad -f
485 /usr/sbin/blkmapd
491 /lib/systemd/systemd-udevd
772 /sbin/mdadm --monitor --scan
1146 /usr/sbin/rpc.idmapd
1197 /sbin/rpcbind -f -w
1201 /usr/sbin/rsyslogd -n
1203 /usr/sbin/inetd
1211 /usr/sbin/smartd -n -s /var/spool/smartd/
1217 /usr/sbin/cron -f
1221 /lib/systemd/systemd-logind
1222 /usr/sbin/atd -f
1225 /usr/sbin/ModemManager
1228 /usr/lib/accountsservice/accounts-daemon
1243 /usr/sbin/irqbalance --foreground
1275 /usr/sbin/acpid
1276 /usr/sbin/cupsd -l
1278 avahi-daemon: running [nice.local]
1279 /usr/bin/dbus-daemon --system --address=systemd: --nofork --nopidfile 
--systemd-activation
1287 avahi-daemon: chroot helper
1288 /usr/sbin/cups-browsed
1289 /usr/sbin/NetworkManager --no-daemon
1290 /usr/lib/rtkit/rtkit-daemon
1311 /usr/lib/policykit-1/polkitd --no-debug
1320 /usr/lib/colord/colord
1371 /usr/lib/cups/notifier/dbus dbus://
1373 /usr/lib/cups/notifier/dbus dbus://
1374 /usr/lib/cups/notifier/dbus dbus://
1375 /usr/lib/cups/notifier/dbus dbus://
1376 /usr/lib/cups/notifier/dbus dbus://
1377 /usr/lib/cups/notifier/dbus dbus://
1378 /usr/lib/cups/notifier/dbus dbus://
1449 /usr/sbin/rpc.mountd --manage-gids
1454 /usr/bin/dockerd -H fd://
1456 /usr/sbin/sshd -D
1458 /usr/sbin/minissdpd -i 0.0.0.0
1462 /usr/sbin/nmbd
1503 /usr/sbin/winbindd
1504 docker-containerd -l 
unix:///var/run/docker/libcontainerd/docker-containerd.sock 
--metrics-interval=0 --start-timeout 2m --state-dir 
/var/run/docker/libcontainerd/containerd --shim docker-containerd-shim 
--runtime docker-runc
1531 /usr/sbin/automount --pid-file /var/run/autofs.pid
1554 /sbin/agetty --noclear tty1 linux
1579 /usr/bin/xdm -nodaemon
1581 /usr/sbin/winbindd
1595 /usr/sbin/mcelog --daemon
1598 /usr/lib/xorg/Xorg :0 vt7 -listen tcp -auth 
/var/lib/xdm/authdir/authfiles/A:0-vRo5KW
1602 /usr/sbin/smbd
1615 /usr/sbin/smbd
1616 /usr/sbin/smbd
1625 /usr/bin/timidity -Os -iAD
1626 /usr/sbin/oidentd -P 192.168.0.1 -u oident -g oident
1669 /usr/bin/monit -c /etc/monit/monitrc
1715 /usr/sbin/console-kit-daemon --no-daemon
1810 /lib/nut/usbhid-ups -a apc
1823 /lib/nut/upsd
1825 /usr/sbin/winbindd
1826 /usr/sbin/winbindd
1827 sendmail: MTA: accepting connections
1830 /lib/nut/upsmon
1831 /lib/nut/upsmon
1837 /usr/sbin/smbd
2100 docker-containerd-shim 
c6652a7559b8d166999facd1c0a4c01eb07d353caa317045c5f76ee3b98c5b36 
/var/run/docker/libcontainerd/c6652a7559b8d166999facd1c0a4c01eb07d353caa317045c5f76ee3b98c5b36
 docker-runc
2543 /usr/sbin/ntpd -p /var/run/ntpd.pid -g -u 114:125
2544 /usr/sbin/uptimed -f
3414 /sbin/rpc.statd --no-notify
6796 /usr/lib/bluetooth/bluetoothd
13987 /usr/lib/upower/upowerd

Does that help?

Raphael

Reply via email to