systemctl daemon-reload in SysVinit (to avoid reboot) [Solved]
-
- Posts: 109
- Joined: Mon Jun 24, 2024 10:39 am
systemctl daemon-reload in SysVinit (to avoid reboot)
Hello,
Each time I edit my /etc/fstab, I have to reboot ('cause IDK better)
On systemD, there is the CL systemctl daemon-reload
I've search and found what is STB the equivalent for SysVinit:
systemctl daemon-reload ------------------------ chkconfig fooserv --add
on a forum post from 2011
But MX23 says it doesn't recognize the cmd "chkconfig"
Is it deprecated, or should I add something to it or install some to run it ?
Or am I to "just" reboot after each change ?
Each time I edit my /etc/fstab, I have to reboot ('cause IDK better)
On systemD, there is the CL systemctl daemon-reload
I've search and found what is STB the equivalent for SysVinit:
systemctl daemon-reload ------------------------ chkconfig fooserv --add
on a forum post from 2011
But MX23 says it doesn't recognize the cmd "chkconfig"
Is it deprecated, or should I add something to it or install some to run it ?
Or am I to "just" reboot after each change ?
Retired: T21, T22, T42p, T61p,
Running: W700DS Suse; T440p MX23.5; P15.gen2 Qubes/Win10
Running: W700DS Suse; T440p MX23.5; P15.gen2 Qubes/Win10
- DukeComposed
- Posts: 1506
- Joined: Thu Mar 16, 2023 1:57 pm
Re: systemctl daemon-reload in SysVinit (to avoid reboot)
Try sudo mount -a.MarieSophie wrote: Fri Jul 12, 2024 3:41 am Hello,
Each time I edit my /etc/fstab, I have to reboot ('cause IDK better)
-
- Posts: 109
- Joined: Mon Jun 24, 2024 10:39 am
Re: systemctl daemon-reload in SysVinit (to avoid reboot)
TY,
But mount -a will mount any swap in the fstab,which is not reloaded, I think you my have missed the point
But mount -a will mount any swap in the fstab,which is not reloaded, I think you my have missed the point
Retired: T21, T22, T42p, T61p,
Running: W700DS Suse; T440p MX23.5; P15.gen2 Qubes/Win10
Running: W700DS Suse; T440p MX23.5; P15.gen2 Qubes/Win10
- DukeComposed
- Posts: 1506
- Joined: Thu Mar 16, 2023 1:57 pm
Re: systemctl daemon-reload in SysVinit (to avoid reboot)
You never mentioned concerns about swap files in the original post. What would I have missed?MarieSophie wrote: Mon Jul 15, 2024 7:40 am But mount -a will mount any swap in the fstab,which is not reloaded, I think you my have missed the point
- dolphin_oracle
- Developer
- Posts: 22713
- Joined: Sun Dec 16, 2007 12:17 pm
Re: systemctl daemon-reload in SysVinit (to avoid reboot)
if you want your mounted conditions to match what is in your fstab, under sysVinit, you would manually do this with mount and umount commands.
If you need to deactivate swap, "swapoff $DEVICENAME" would be the command. activate swap with "swapon $DEVICENAME"
If you need to deactivate swap, "swapoff $DEVICENAME" would be the command. activate swap with "swapon $DEVICENAME"
http://www.youtube.com/runwiththedolphin
lenovo ThinkPad X1 Extreme Gen 4 - MX-23
FYI: mx "test" repo is not the same thing as debian testing repo.
Live system help document: https://mxlinux.org/wiki/help-antix-live-usb-system/
lenovo ThinkPad X1 Extreme Gen 4 - MX-23
FYI: mx "test" repo is not the same thing as debian testing repo.
Live system help document: https://mxlinux.org/wiki/help-antix-live-usb-system/
-
- Posts: 109
- Joined: Mon Jun 24, 2024 10:39 am
Re: systemctl daemon-reload in SysVinit (to avoid reboot)
Indeed, I didn't, and while re-reading this short (luckily) thread I recon I answered to quickly (for a change).DukeComposed wrote: Mon Jul 15, 2024 8:07 amYou never mentioned concerns about swap files in the original post. What would I have missed?MarieSophie wrote: Mon Jul 15, 2024 7:40 am But mount -a will mount any swap in the fstab,which is not reloaded, I think you my have missed the point
Yes, the mount -a will (re)mount the complete fstab, that should be enough for this part,
But the original question is about the command
Code: Select all
systemctl daemon-reload ------------------------ chkconfig fooserv --add
Is this command only mounting and therefore the exact same as mount -a, or does it stop/restart some systems, which then "mount -a" doesn't do ?
Retired: T21, T22, T42p, T61p,
Running: W700DS Suse; T440p MX23.5; P15.gen2 Qubes/Win10
Running: W700DS Suse; T440p MX23.5; P15.gen2 Qubes/Win10
Re: systemctl daemon-reload in SysVinit (to avoid reboot)
man systemctl says:
So, it's a "soft" reload, essentially; taking changed configurations from filesystem and regenerating dependency trees.
Consequently, systemd.generator states:
AS I read this, it appears it does FAR more than 'just remount" .. it checks for changes in configs, and variants from "regneration og binaries" too !
daemon-reload
Reload systemd manager configuration. This will rerun all generators (see systemd.generator(7)), reload all unit files, and recreate the entire dependency tree. While the daemon is being reloaded, all sockets systemd listens on behalf of user configuration will stay accessible.
This command should not be confused with the reload command.
So, it's a "soft" reload, essentially; taking changed configurations from filesystem and regenerating dependency trees.
Consequently, systemd.generator states:
Generators are small binaries that live in /usr/lib/systemd/user-generators/ and other directories listed above. systemd(1) will execute those binaries very early at bootup and at configuration reload time — before unit files are loaded. Generators can dynamically generate unit files or create symbolic links to unit files to add additional dependencies, thus extending or overriding existing definitions. Their main purpose is to convert configuration files that are not native unit files dynamically into native unit files.
Generators are loaded from a set of paths determined during compilation, listed above. System and user generators are loaded from directories with names ending in system-generators/ and user-generators/, respectively. Generators found in directories listed earlier override the ones with the same name in directories lower in the list. A symlink to /dev/null or an empty file can be used to mask a generator, thereby preventing it from running. Please note that the order of the two directories with the highest priority is reversed with respect to the unit load path and generators in /run overwrite those in /etc.
After installing new generators or updating the configuration, systemctl daemon-reload may be executed. This will delete the previous configuration created by generators, re-run all generators, and cause systemd to reload units from disk. See systemctl(1) for more information.
AS I read this, it appears it does FAR more than 'just remount" .. it checks for changes in configs, and variants from "regneration og binaries" too !
*QSI = Quick System Info from menu (Copy for Forum)
*MXPI = MX Package Installer
*Please check the solved checkbox on the post that solved it.
*Linux -This is the way!
*MXPI = MX Package Installer
*Please check the solved checkbox on the post that solved it.
*Linux -This is the way!
Re: systemctl daemon-reload in SysVinit (to avoid reboot)
Specifying the 'daemon-reload' ... means it removes cache and starts that process all over again. This was one of the big deals, because under sysvinit you need to clear some cache in some instances. Not sure this is one of those, but the theory is the same as I understand it.
*QSI = Quick System Info from menu (Copy for Forum)
*MXPI = MX Package Installer
*Please check the solved checkbox on the post that solved it.
*Linux -This is the way!
*MXPI = MX Package Installer
*Please check the solved checkbox on the post that solved it.
*Linux -This is the way!
Re: systemctl daemon-reload in SysVinit (to avoid reboot) [Solved]
If you have only changed the /etc/fstab and when you run systemd as init systemd,MarieSophie wrote: Mon Jul 22, 2024 3:48 pm Is this command only mounting and therefore the exact same as mount -a, or does it stop/restart some systems, which then "mount -a" doesn't do ?
systemd would normally detect the changes made,
In doubt you can tell systemd to check for changes with
Code: Select all
sudo systemctl daemon-reload
including the /etc/fstab and trigger to generated and run mount-services for the entries found,
So yes "mount -a" can be done when running systemd with "sudo systemctl daemon-reload",
b/c systemd invented a new method to mount partitions with services.