CLI shutdown command functionality

Forum › Forums › antiX-development › Development › CLI shutdown command functionality

Tagged: 

  • This topic has 8 replies, 5 voices, and was last updated Apr 6-7:09 pm by Etendue.
Viewing 9 posts - 1 through 9 (of 9 total)
  • Author
    Posts
  • #200907
    Etendue
    Member

      Hi, just a question re the shutdown command in antiX 26.

      Will there be a more functional shutdown command, like FreeBSD shutdown(man page 8) or for that matter Ubuntu shutdown(man page 8)?

      Contemplating making one myself, if not 😉

      The reason is that I have a system for managing a somewhat large number of Arch, Debian, FreeBSD and Ubuntu (which btw is about to be phased out) system that uses a typical “standard” shutdown command and is dependent on a flexible time / date specification. I.e. “shutdown [OPTIONS…] [TIME] [WALL…]”

      Currently using runit version on the two antiX systems.

      Cheers

      #200911
      anti-apXos
      Member

        The shutdown command depends on the init system, so there’s 5 different versions on antix-26.

        Runit’s shutdown does not have a time argument (except “now”, which is kept for compatibility, I guess). See https://manpages.debian.org/testing/runit/runit-shutdown.8.en.html

        Among the other inits that ship with anti-26, dinit also doesnt have a time argument for its shutdown command, but all of the others do (sysvinit, s6-66, and s6-rc) so you could use one of those if you don’t want to make the script yourself to do it on runit.

        "--"

        #200913
        Wallon
        Member

          Hi,

          In my experience with antiX (especially with runit and on slower hardware), the behavior of shutdown and halt is not always as robust as expected in other distributions (e.g. Ubuntu or FreeBSD).

          I’ve consistently seen that using shutdown or halt can sometimes lead to an unclean unmount, which results in a filesystem check (fsck) on the next boot.

          On the other hand, using:

          
          sync
          sudo poweroff

          has proven to be more reliable. poweroff tends to trigger a more direct and complete shutdown sequence in antiX, and combining it with sync ensures that pending disk writes are flushed before the system powers down.

          For this reason, in antiX environments—especially on slower systems or removable media—poweroff is often the safer and more consistent option compared to shutdown or halt.

          Best regards,
          Wallon

          #200914
          anticapitalista
          Forum Admin

            Why not simply shutdown via the provided gui?

            Philosophers have interpreted the world in many ways; the point is to change it.

            antiX with runit - leaner and meaner.

            #200920
            Brian Masinick
            Moderator

              @Wallon, I’ve been doing something similar for a while:

              On my antiX 26 system I am using
              alias pow='sync;sync;sync;sleep 2s;sudo /lib/init-diversity/poweroff.sh'
              so pow does the poweroff functionality and I use this routine for consistency.

              On antix 23.2 it looks similar:
              alias pow='sync;sync;sync;sleep 2s;sudo poweroff'

              I have similar commands for reboot on each system too, the alias is rb.

              --
              Brian Masinick
              Alternate "Search B":
              This search page

              #200923
              Wallon
              Member

                Why not simply shutdown via the provided gui?

                On some devices, this no longer works very well, particularly with sysVinit.

                #200929
                anticapitalista
                Forum Admin

                  Why not simply shutdown via the provided gui?

                  On some devices, this no longer works very well, particularly with sysVinit.

                  What is the problem?

                  Philosophers have interpreted the world in many ways; the point is to change it.

                  antiX with runit - leaner and meaner.

                  #200946
                  Etendue
                  Member

                    Well, I guess I have slightly different “use case” here, as I run these two (test) antiX machines as servers, and my (LAN restricted) admin tool for these systems currently ssh into each machine for cpu/gpu throttling, shutdowns and reboots and even fine tunes the computations running there.

                    So, why testing antiX? Well, because it is a lean and (hopefully) very stable distro. I am a bit allergic to systemd, even though I’ve been using systemd distros for years. Actually, I am a bit uneasy where Canonical will take Ubuntu over time …
                    The same grievances, in principle, for Debian and Arch, with their dependency on systemd.

                    I might test Artix Linux as a replacement for Arch.

                    Cheers

                    • This reply was modified 5 months, 3 weeks ago by Etendue.
                    • This reply was modified 5 months, 3 weeks ago by Etendue.
                    #200948
                    Etendue
                    Member

                      Hi, thank you. I will test one of the other inits ASAP.
                      That will probably need a reinstall I imagine …

                    Viewing 9 posts - 1 through 9 (of 9 total)
                    • You must be logged in to reply to this topic.