I'm running Ubuntu 20.04.2 LTS (GNU/Linux 5.4.0-73-generic x86_64)
simple install from DigitalOcean and have installed packages, etc.
Notice this startup test script:
bryan@db:~$ ls -lh /etc/rc3.d/S02test
-rwxr-xr-x 1 root root 43 May 11 20:10 /etc/rc3.d/S02test
bryan@db:~$ cat /etc/rc3.d/S02test
#!/bin/sh
echo TESTHAY "$@" > /testhay.txt
bryan@db:~$
But when I reboot with init 6
, it does not execute.
bryan@db:~$ ls -lh /testhay.txt
ls: cannot access '/testhay.txt': No such file or directory
bryan@db:~$
But running the script manually works... so, how can I make it work on reboot too?
/etc/rcX.d
instead of systemd units? – muru May 12 '21 at 01:36/etc/rc?.d
is two generations behind the times. – waltinator May 12 '21 at 01:49/etc/rc3.d/S01*
symlinks in there. As for the two newer generations, what's the other one besides systemd units? I will try systemd units. – 700 Software May 12 '21 at 14:07