From 5928bf00c094a250c3d9cc4346075cd65c87e865 Mon Sep 17 00:00:00 2001 From: Laurent Bercot Date: Sat, 10 Sep 2016 13:42:04 +0000 Subject: Remove s6-halt, s6-poweroff and s6-reboot (moved to the s6-linux-init package) --- doc/index.html | 3 --- doc/s6-halt.html | 55 --------------------------------------- doc/s6-poweroff.html | 55 --------------------------------------- doc/s6-reboot.html | 55 --------------------------------------- doc/upgrade.html | 4 +++ package/deps.mak | 10 ------- package/modes | 3 --- package/targets.mak | 3 --- src/minutils/deps-exe/s6-halt | 1 - src/minutils/deps-exe/s6-poweroff | 1 - src/minutils/deps-exe/s6-reboot | 1 - src/minutils/hpr.c | 44 ------------------------------- src/minutils/s6-halt.c | 7 ----- src/minutils/s6-poweroff.c | 7 ----- src/minutils/s6-reboot.c | 7 ----- src/minutils/s6ps_statparse.c | 3 ++- 16 files changed, 6 insertions(+), 253 deletions(-) delete mode 100644 doc/s6-halt.html delete mode 100644 doc/s6-poweroff.html delete mode 100644 doc/s6-reboot.html delete mode 100644 src/minutils/deps-exe/s6-halt delete mode 100644 src/minutils/deps-exe/s6-poweroff delete mode 100644 src/minutils/deps-exe/s6-reboot delete mode 100644 src/minutils/hpr.c delete mode 100644 src/minutils/s6-halt.c delete mode 100644 src/minutils/s6-poweroff.c delete mode 100644 src/minutils/s6-reboot.c diff --git a/doc/index.html b/doc/index.html index 1d2527b..b3ade25 100644 --- a/doc/index.html +++ b/doc/index.html @@ -89,14 +89,11 @@ the previous versions of s6-linux-utils and the current one.
  • The s6-uevent-listener program
  • The s6-uevent-spawner program
  • The s6-freeramdisk program
  • -
  • The s6-halt program
  • The s6-hostname program
  • The s6-logwatch program
  • The s6-mount program
  • The s6-pivotchroot program
  • -
  • The s6-poweroff program
  • The s6-ps program
  • -
  • The s6-reboot program
  • The s6-swapoff program
  • The s6-swapon program
  • The s6-umount program
  • diff --git a/doc/s6-halt.html b/doc/s6-halt.html deleted file mode 100644 index 4837b86..0000000 --- a/doc/s6-halt.html +++ /dev/null @@ -1,55 +0,0 @@ - - - - - - s6-linux-utils: the s6-halt program - - - - - - -

    -s6-linux-utils
    -Software
    -skarnet.org -

    - -

    The s6-halt program

    - -

    -s6-halt sends a signal to process 1 in order to halt the machine; -or, with the -f option, it performs an immediate hard shutdown. -

    - -

    Interface

    - -
    -     s6-halt [ -h | -p | -r ] [ -f ]
    -
    - - - -

    Options

    - - - - - diff --git a/doc/s6-poweroff.html b/doc/s6-poweroff.html deleted file mode 100644 index 5b0a4fc..0000000 --- a/doc/s6-poweroff.html +++ /dev/null @@ -1,55 +0,0 @@ - - - - - - s6-linux-utils: the s6-poweroff program - - - - - - -

    -s6-linux-utils
    -Software
    -skarnet.org -

    - -

    The s6-poweroff program

    - -

    -s6-poweroff sends a signal to process 1 in order to power off the machine; -or, with the -f option, it performs an immediate hard shutdown. -

    - -

    Interface

    - -
    -     s6-poweroff [ -h | -p | -r ] [ -f ]
    -
    - - - -

    Options

    - - - - - diff --git a/doc/s6-reboot.html b/doc/s6-reboot.html deleted file mode 100644 index 7f01260..0000000 --- a/doc/s6-reboot.html +++ /dev/null @@ -1,55 +0,0 @@ - - - - - - s6-linux-utils: the s6-reboot program - - - - - - -

    -s6-linux-utils
    -Software
    -skarnet.org -

    - -

    The s6-reboot program

    - -

    -s6-reboot sends a signal to process 1 in order to reboot the machine; -or, with the -f option, it performs an immediate reboot. -

    - -

    Interface

    - -
    -     s6-reboot [ -h | -p | -r ] [ -f ]
    -
    - - - -

    Options

    - - - - - diff --git a/doc/upgrade.html b/doc/upgrade.html index 5524600..1851be9 100644 --- a/doc/upgrade.html +++ b/doc/upgrade.html @@ -22,6 +22,10 @@

    in 2.1.0.0

    diff --git a/package/deps.mak b/package/deps.mak index 6239279..d1aa40b 100644 --- a/package/deps.mak +++ b/package/deps.mak @@ -2,18 +2,14 @@ # This file has been generated by tools/gen-deps.sh # -src/minutils/hpr.o src/minutils/hpr.lo: src/minutils/hpr.c src/minutils/s6-chroot.o src/minutils/s6-chroot.lo: src/minutils/s6-chroot.c src/minutils/s6-devd.o src/minutils/s6-devd.lo: src/minutils/s6-devd.c src/include/s6-linux-utils/config.h src/minutils/s6-freeramdisk.o src/minutils/s6-freeramdisk.lo: src/minutils/s6-freeramdisk.c -src/minutils/s6-halt.o src/minutils/s6-halt.lo: src/minutils/s6-halt.c src/minutils/s6-hostname.o src/minutils/s6-hostname.lo: src/minutils/s6-hostname.c src/minutils/s6-logwatch.o src/minutils/s6-logwatch.lo: src/minutils/s6-logwatch.c src/minutils/s6-mount.o src/minutils/s6-mount.lo: src/minutils/s6-mount.c src/minutils/mount-constants.h src/minutils/s6-pivotchroot.o src/minutils/s6-pivotchroot.lo: src/minutils/s6-pivotchroot.c -src/minutils/s6-poweroff.o src/minutils/s6-poweroff.lo: src/minutils/s6-poweroff.c src/minutils/s6-ps.o src/minutils/s6-ps.lo: src/minutils/s6-ps.c src/minutils/s6-ps.h -src/minutils/s6-reboot.o src/minutils/s6-reboot.lo: src/minutils/s6-reboot.c src/minutils/s6-swapoff.o src/minutils/s6-swapoff.lo: src/minutils/s6-swapoff.c src/minutils/s6-swapon.o src/minutils/s6-swapon.lo: src/minutils/s6-swapon.c src/minutils/s6-uevent-listener.o src/minutils/s6-uevent-listener.lo: src/minutils/s6-uevent-listener.c @@ -33,8 +29,6 @@ s6-devd: EXTRA_LIBS := s6-devd: src/minutils/s6-devd.o -lskarnet s6-freeramdisk: EXTRA_LIBS := s6-freeramdisk: src/minutils/s6-freeramdisk.o -lskarnet -s6-halt: EXTRA_LIBS := -s6-halt: src/minutils/s6-halt.o -lskarnet s6-hostname: EXTRA_LIBS := s6-hostname: src/minutils/s6-hostname.o -lskarnet s6-logwatch: EXTRA_LIBS := @@ -43,12 +37,8 @@ s6-mount: EXTRA_LIBS := s6-mount: src/minutils/s6-mount.o -lskarnet s6-pivotchroot: EXTRA_LIBS := s6-pivotchroot: src/minutils/s6-pivotchroot.o -lskarnet -s6-poweroff: EXTRA_LIBS := -s6-poweroff: src/minutils/s6-poweroff.o -lskarnet s6-ps: EXTRA_LIBS := s6-ps: src/minutils/s6-ps.o src/minutils/s6ps_statparse.o src/minutils/s6ps_otree.o src/minutils/s6ps_pfield.o src/minutils/s6ps_pwcache.o src/minutils/s6ps_grcache.o src/minutils/s6ps_ttycache.o src/minutils/s6ps_wchan.o -lskarnet -s6-reboot: EXTRA_LIBS := -s6-reboot: src/minutils/s6-reboot.o -lskarnet s6-swapoff: EXTRA_LIBS := s6-swapoff: src/minutils/s6-swapoff.o -lskarnet s6-swapon: EXTRA_LIBS := diff --git a/package/modes b/package/modes index 3905269..c436595 100644 --- a/package/modes +++ b/package/modes @@ -3,14 +3,11 @@ s6-devd 0700 s6-uevent-listener 0700 s6-uevent-spawner 0755 s6-freeramdisk 0700 -s6-halt 0700 s6-hostname 0755 s6-logwatch 0755 s6-mount 0700 s6-pivotchroot 0700 -s6-poweroff 0700 s6-ps 0755 -s6-reboot 0700 s6-swapoff 0700 s6-swapon 0700 s6-umount 0700 diff --git a/package/targets.mak b/package/targets.mak index c760217..c01bea2 100644 --- a/package/targets.mak +++ b/package/targets.mak @@ -4,14 +4,11 @@ s6-devd \ s6-uevent-listener \ s6-uevent-spawner \ s6-freeramdisk \ -s6-halt \ s6-hostname \ s6-logwatch \ s6-mount \ s6-pivotchroot \ -s6-poweroff \ s6-ps \ -s6-reboot \ s6-swapoff \ s6-swapon \ s6-umount \ diff --git a/src/minutils/deps-exe/s6-halt b/src/minutils/deps-exe/s6-halt deleted file mode 100644 index e7187fe..0000000 --- a/src/minutils/deps-exe/s6-halt +++ /dev/null @@ -1 +0,0 @@ --lskarnet diff --git a/src/minutils/deps-exe/s6-poweroff b/src/minutils/deps-exe/s6-poweroff deleted file mode 100644 index e7187fe..0000000 --- a/src/minutils/deps-exe/s6-poweroff +++ /dev/null @@ -1 +0,0 @@ --lskarnet diff --git a/src/minutils/deps-exe/s6-reboot b/src/minutils/deps-exe/s6-reboot deleted file mode 100644 index e7187fe..0000000 --- a/src/minutils/deps-exe/s6-reboot +++ /dev/null @@ -1 +0,0 @@ --lskarnet diff --git a/src/minutils/hpr.c b/src/minutils/hpr.c deleted file mode 100644 index 0e1c27a..0000000 --- a/src/minutils/hpr.c +++ /dev/null @@ -1,44 +0,0 @@ -/* ISC license. */ - -#include -#include -#include -#include -#include - -#define USAGE PROGNAME " [ -h | -p | -r ] [ -f ]" - -int main (int argc, char const *const *argv) -{ - int what = WHATDEFAULT ; - int force = 0 ; - PROG = PROGNAME ; - - { - subgetopt_t l = SUBGETOPT_ZERO ; - for (;;) - { - register int opt = subgetopt_r(argc, argv, "hprf", &l) ; - if (opt == -1) break ; - switch (opt) - { - case 'h' : what = 1 ; break ; - case 'p' : what = 2 ; break ; - case 'r' : what = 3 ; break ; - case 'f' : force = 1 ; break ; - default : strerr_dieusage(100, USAGE) ; - } - } - argc -= l.ind ; argv += l.ind ; - } - - if (force) - { - sync() ; - reboot(what == 3 ? RB_AUTOBOOT : what == 2 ? RB_POWER_OFF : RB_HALT_SYSTEM) ; - strerr_diefu1sys(111, "reboot()") ; - } - else if (kill(1, what == 3 ? SIGINT : what == 2 ? SIGUSR1 : SIGUSR2) < 0) - strerr_diefu1sys(111, "signal process 1") ; - return 0 ; -} diff --git a/src/minutils/s6-halt.c b/src/minutils/s6-halt.c deleted file mode 100644 index d758030..0000000 --- a/src/minutils/s6-halt.c +++ /dev/null @@ -1,7 +0,0 @@ -/* ISC license. */ - -#undef PROGNAME -#define PROGNAME "s6-halt" -#undef WHATDEFAULT -#define WHATDEFAULT 1 -#include "hpr.c" diff --git a/src/minutils/s6-poweroff.c b/src/minutils/s6-poweroff.c deleted file mode 100644 index f9f7747..0000000 --- a/src/minutils/s6-poweroff.c +++ /dev/null @@ -1,7 +0,0 @@ -/* ISC license. */ - -#undef PROGNAME -#define PROGNAME "s6-poweroff" -#undef WHATDEFAULT -#define WHATDEFAULT 2 -#include "hpr.c" diff --git a/src/minutils/s6-reboot.c b/src/minutils/s6-reboot.c deleted file mode 100644 index 0bf8785..0000000 --- a/src/minutils/s6-reboot.c +++ /dev/null @@ -1,7 +0,0 @@ -/* ISC license. */ - -#undef PROGNAME -#define PROGNAME "s6-reboot" -#undef WHATDEFAULT -#define WHATDEFAULT 3 -#include "hpr.c" diff --git a/src/minutils/s6ps_statparse.c b/src/minutils/s6ps_statparse.c index b5976a1..d8bc39e 100644 --- a/src/minutils/s6ps_statparse.c +++ b/src/minutils/s6ps_statparse.c @@ -149,7 +149,8 @@ int s6ps_statparse (pscan_t *p) if (pos + 1 > p->statlen) return 0 ; if (p->data.s[pos++] != ' ') return 0 ; w = (*scanfuncs[i])(p->data.s + pos, scanresults[i]) ; - if (!w) return 0 ; pos += w ; + if (!w) return 0 ; + pos += w ; } return 1 ; } -- cgit v1.2.3