Hi,
I noticed some time ago that rc.local became a service. I'm just getting around to address this issue but am having trouble getting my fedora 41 system to "notice" my efforts.
Can someone post what they're doing to implement this new way of doing things, please?
Best regards,
George...
Am 29.04.2024 um 19:57 schrieb George R Goffe via users users@lists.fedoraproject.org:
Hi,
I noticed some time ago that rc.local became a service. I'm just getting around to address this issue but am having trouble getting my fedora 41 system to "notice" my efforts.
Can someone post what they're doing to implement this new way of doing things, please?
Best regards,
George...
We use it to autostart nspawn containers at system boot, after the system project disabled the systemctl enable option for nspawn container.
(Re-)activation of rc.local ———— edit ------ […]# vim /etc/rc.d/rc.local # create and edit file #!/bin/bash
systemctl start systemd-nspawn@CONTAINER_NAME
[[ <esc> wq ]]
[…]# chmod ug+x /etc/rc.d/rc.local # adjust permissions of created file
[…]# #### Just in case you depend on a specific network service #### […]# mkdir /etc/systemd/system/rc-local.service.d/ […]# vim /etc/systemd/system/rc-local.service.d/network.conf # /etc/systemd/system/rc-local.service.d/network.conf [Unit] Wants=network-online.target After=network-online.target
[[ <esc> wq ]] […]#
[…]# /usr/lib/systemd/system-generators/systemd-rc-local-generator # execute ------
Each time you modify /etc/rc.d/rc.local you must rerun systemd-rc-local-generator!
Issue with F 36/37: When called, the message: "This program takes one or three arguments." is displayed. The parameter "-h" causes the output of an error message, e.g. that rc.local is not executable.
A "man systemd-rc-local-generator" does not mention anything about required parameters, a "systemd-rc-local-generator --help" gives a lot of options and shows "file ..." as a parameter, but no explanation of which files.
It works nevertheless.
-- Peter Boy https://fedoraproject.org/wiki/User:Pboy PBoy@fedoraproject.org
Timezone: CET (UTC+1) / CEST (UTC+2)
Fedora Server Edition Working Group member Fedora Docs team contributor and board member Java developer and enthusiast
On 29 Apr 2024, at 18:57, George R Goffe via users users@lists.fedoraproject.org wrote:
Hi,
I noticed some time ago that rc.local became a service. I'm just getting around to address this issue but am having trouble getting my fedora 41 system to "notice" my efforts.
Do you mean f40?
Can someone post what they're doing to implement this new way of doing things, please?
I write systemd services for things that in the past would have gone into rc.local. What do you have in your rc.local that could be converted?
Also I do not use crontab any more, I replaced with systemd timer units.
Barry
Best regards,
George...
users mailing list -- users@lists.fedoraproject.org To unsubscribe send an email to users-leave@lists.fedoraproject.org Fedora Code of Conduct: https://docs.fedoraproject.org/en-US/project/code-of-conduct/ List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines List Archives: https://lists.fedoraproject.org/archives/list/users@lists.fedoraproject.org Do not reply to spam, report it: https://pagure.io/fedora-infrastructure/new_issue
On 29 Apr 2024 at 17:57, George R Goffe via users wrote:
Date sent: Mon, 29 Apr 2024 17:57:12 +0000 (UTC) To: "users@lists.fedoraproject.org" users@lists.fedoraproject.org Subject: rc.local Send reply to: George R Goffe grgoffe@yahoo.com, Community support for Fedora users users@lists.fedoraproject.org From: George R Goffe via users users@lists.fedoraproject.org Copies to: George R Goffe grgoffe@yahoo.com
Hi,
I noticed some time ago that rc.local became a service. I'm just getting around to address this issue but am having trouble getting my fedora 41 system to "notice" my efforts.
Just too things to check. The service is rc-local and requires the /etc/rc.d/rc.local file.
This is what I see with my Fedora 39 with rc-local systemctl status rc-local
rc-local.service - /etc/rc.d/rc.local Compatibility Loaded: loaded (/usr/lib/systemd/system/rc-local.service; enabled-runtime; preset: disabled) Drop-In: /usr/lib/systemd/system/service.d └─10-timeout-abort.conf Active: active (running) since Sat 2024-04-27 15:31:33 ChST; 2 days ago Docs: man:systemd-rc-local-generator(8) Tasks: 1 (limit: 18938) Memory: 206.4M CPU: 28.486s CGroup: /system.slice/rc-local.service └─1550 freshclam -c 2 -d
Don't know if that helps, or you are already aware of.
Can someone post what they're doing to implement this new way of doing things, please?
Best regards,
George...
users mailing list -- users@lists.fedoraproject.org To unsubscribe send an email to users-leave@lists.fedoraproject.org Fedora Code of Conduct: https://docs.fedoraproject.org/en-US/project/code-of-conduct/ List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines List Archives: https://lists.fedoraproject.org/archives/list/users@lists.fedoraproject.org Do not reply to spam, report it: https://pagure.io/fedora-infrastructure/new_issue
+------------------------------------------------------------+ Michael D. Setzer II - Computer Science Instructor (Retired) mailto:mikes@guam.net mailto:msetzerii@gmail.com mailto:msetzerii@gmx.com Guam - Where America's Day Begins G4L Disk Imaging Project maintainer http://sourceforge.net/projects/g4l/ +------------------------------------------------------------+
Hi,
I noticed some time ago that rc.local became a service. I'm just getting around to address this issue but am having trouble getting my fedora 41 system to "notice" my efforts.
Can someone post what they're doing to implement this new way of doing things, please?
Best regards,
George...
as already said, you need to create a file named rc.local under /etc/rc.d rights (here) are: sudo ls -l /etc/rc.d/rc.local -rwx------. 1 root root 5298 10. Apr 15:20 /etc/rc.d/rc.local
my content here is mostly stuff powertop told me to set:
my rc.local: =========================== #!/bin/bash touch /var/lock/subsys/local
################################################ # # Powertop setting # #################################################
# Wake-on-lan status for device enp3s0 echo 'enabled' > '/sys/class/net/enp3s0/device/power/wakeup';
# Enable Audio codec power management echo '1' > '/sys/module/snd_hda_intel/parameters/power_save';
# Enable SATA link power management for host0 echo 'med_power_with_dipm' > '/sys/class/scsi_host/host0/link_power_management_policy';
# Enable SATA link power management for host2 echo 'med_power_with_dipm' > '/sys/class/scsi_host/host2/link_power_management_policy';
# Enable SATA link power management for host4 echo 'med_power_with_dipm' > '/sys/class/scsi_host/host4/link_power_management_policy';
# Enable SATA link power management for host1 echo 'med_power_with_dipm' > '/sys/class/scsi_host/host1/link_power_management_policy';
# Enable SATA link power management for host3 echo 'med_power_with_dipm' > '/sys/class/scsi_host/host3/link_power_management_policy';
# Enable SATA link power management for host5 echo 'med_power_with_dipm' > '/sys/class/scsi_host/host5/link_power_management_policy';
# VM writeback timeout echo '1500' > '/proc/sys/vm/dirty_writeback_centisecs';
# NMI watchdog should be turned off echo '0' > '/proc/sys/kernel/nmi_watchdog';
### Autosuspend for USB device USB Receiver [Logitech] echo 'auto' > '/sys/bus/usb/devices/1-8/power/control'; echo 'auto' > '/sys/bus/usb/devices/1-10.1/power/control'; # echo 'disabled' > '/sys/bus/usb/devices/1-8/power/wakeup';
# Autosuspend for USB device AURA LED Controller [AsusTek Computer Inc.] echo 'auto' > '/sys/bus/usb/devices/1-2/power/control';
# Autosuspend for USB device USB Audio CODEC [Burr-Brown from TI ] echo 'auto' > '/sys/bus/usb/devices/1-10.3/power/control';
# Runtime PM for disk sda echo 'auto' > '/sys/block/sda/device/power/control';
# Runtime PM for PCI Device Intel Corporation Device 43d2 echo 'auto' > '/sys/bus/pci/devices/0000:00:17.0/power/control';
# Runtime PM for PCI Device Intel Corporation Ethernet Controller I225-V echo 'auto' > '/sys/bus/pci/devices/0000:03:00.0/power/control';
# Runtime PM for port ata1 of PCI device: Intel Corporation Device 43d2 echo 'auto' > '/sys/bus/pci/devices/0000:00:17.0/ata1/power/control';
# Runtime PM for port ata2 of PCI device: Intel Corporation Device 43d2 echo 'auto' > '/sys/bus/pci/devices/0000:00:17.0/ata2/power/control';
# Runtime PM for port ata3 of PCI device: Intel Corporation Device 43d2 echo 'auto' > '/sys/bus/pci/devices/0000:00:17.0/ata3/power/control';
# Runtime PM for PCI Device Intel Corporation Tiger Lake-H Shared SRAM echo 'auto' > '/sys/bus/pci/devices/0000:00:14.2/power/control';
# Runtime PM for port ata5 of PCI device: Intel Corporation Device 43d2 echo 'auto' > '/sys/bus/pci/devices/0000:00:17.0/ata5/power/control';
# Runtime PM for PCI Device Intel Corporation Tiger Lake-H SPI Controller echo 'auto' > '/sys/bus/pci/devices/0000:00:1f.5/power/control';
# Runtime PM for PCI Device Intel Corporation Device 4c53 echo 'auto' > '/sys/bus/pci/devices/0000:00:00.0/power/control';
# Runtime PM for port ata4 of PCI device: Intel Corporation Device 43d2 echo 'auto' > '/sys/bus/pci/devices/0000:00:17.0/ata4/power/control';
# Runtime PM for PCI Device Intel Corporation Tiger Lake-H PCI Express Root Port #9 echo 'auto' > '/sys/bus/pci/devices/0000:00:1d.0/power/control';
# Runtime PM for port ata6 of PCI device: Intel Corporation Device 43d2 echo 'auto' > '/sys/bus/pci/devices/0000:00:17.0/ata6/power/control';
# Runtime PM for PCI Device Intel Corporation Tiger Lake-H PCI Express Root Port #5 echo 'auto' > '/sys/bus/pci/devices/0000:00:1c.0/power/control';
# Runtime PM for PCI Device Intel Corporation Device 4387 echo 'auto' > '/sys/bus/pci/devices/0000:00:1f.0/power/control';
# Runtime PM for PCI Device Intel Corporation Tiger Lake PCH CNVi WiFi echo 'auto' > '/sys/bus/pci/devices/0000:00:14.3/power/control';
# Runtime PM for PCI Device Samsung Electronics Co Ltd NVMe SSD Controller PM9A1/PM9A3/980PRO echo 'auto' > '/sys/bus/pci/devices/0000:01:00.0/power/control';
# Wake-on-lan status for device wlo1 echo 'enabled' > '/sys/class/net/wlo1/device/power/wakeup';
# Wake status for USB device 1-9 echo 'enabled' > '/sys/bus/usb/devices/1-9/power/wakeup';
# Wake status for USB device 1-14 echo 'enabled' > '/sys/bus/usb/devices/1-14/power/wakeup';
# Wake status for USB device usb1 echo 'enabled' > '/sys/bus/usb/devices/usb1/power/wakeup';
# Wake status for USB device 1-10 echo 'enabled' > '/sys/bus/usb/devices/1-10/power/wakeup';
# Wake status for USB device usb2 echo 'enabled' > '/sys/bus/usb/devices/usb2/power/wakeup';
# Wake status for USB device 1-2 echo 'enabled' > '/sys/bus/usb/devices/1-2/power/wakeup';
exit 0; ===================================================
don't know is the first line "touch /var/lock/subsys/local" is still needed (it was in elder rc.local present), but it doesn't hurt (here).
to my understanding the systemd service "rc-local.service" just picks up the file and excutes the content of /etc/rc.d/rc.local
sudo systemctl restart rc.local or a reboot
more to read: man systemd-rc-local-generator