• gazter@aussie.zone
    link
    fedilink
    arrow-up
    0
    ·
    9 days ago

    Linux newb here. What does this mean? My knowledge of systemd is that it is responsible for things like mounting disks and running networking. So does this mean I can ask systemd to grab a new IP address every x hours, even if the machine is asleep?

    • rtxn@lemmy.worldM
      link
      fedilink
      arrow-up
      0
      ·
      edit-2
      9 days ago

      Systemd is a collection of low-level system utilities. Its primary responsibility is managing services and serving as the init process (PID 1, the first userspace process started by the kernel), but it also has other components, like systemd-boot (a boot loader and GRUB alternative), journald (system logging), networkd (network interface management), resolved (DNS resolver), or udevd (manages device files in /dev).

      People tend to vilify systemd because it is maintained by Red Hat, a company with many controversies, and a pariah among the more extreme FOSS enthusiasts; and because it’s seen as bad practice to have a single entity be responsible for so many low-level system components.

      Note: the -d suffix is not exclusive to systemd things. It simply marks the program as a daemon, a long-running background process that provides some kind of service. For example, sshd (SSH server) or httpd (Apache server on some distros) are not parts of systemd.

      To answer your question: not really. As far as I know, the network interface won’t have an IP address unless the computer is turned on. If you use a timer (or any other method for that matter) to power on the computer, it will request an address from DHCP as soon as the interface is brought up (unless it has a static address).

      A more practical application would be scheduling long, unattended tasks, like updates or making backups.

    • Björn Tantau@swg-empire.deOP
      link
      fedilink
      arrow-up
      0
      ·
      9 days ago

      Systemd at its core starts stuff when your Linux system boots and during normal operation. It can also start stuff at specific times. That was traditionally done by cron.

      But of course when you set up to run something at midnight it cannot run if the system is in standby. But with the WakeSystem=true option you can tell it to basically set an alarm for the computer to turn itself back on and do whatever you want it to do.

      It does not turn your computer back to sleep, though. That’s something you have to script yourself.

      I hope they add the ability to turn the computer on even if it is completely shut off. That would make keeping my family’s computers updated much easier.

      • KaninchenSpeed@sh.itjust.works
        link
        fedilink
        arrow-up
        0
        ·
        8 days ago

        I hope they add the ability to turn the computer on even if it is completely shut off. That would make keeping my family’s computers updated much easier.

        That’s probably not possible, but you could do it with a microcontroller and a relay bridging the power switch.