summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLaurent Bercot <ska-skaware@skarnet.org>2016-09-10 13:42:04 +0000
committerLaurent Bercot <ska-skaware@skarnet.org>2016-09-10 13:42:04 +0000
commit5928bf00c094a250c3d9cc4346075cd65c87e865 (patch)
treed9d00749c1ea23c6df7af35be5517631830d1cb4
parenta19ce7bb451236b79ac79d7ffc8e8fa12323ea0d (diff)
downloads6-linux-utils-5928bf00c094a250c3d9cc4346075cd65c87e865.tar.xz
Remove s6-halt, s6-poweroff and s6-reboot (moved to the s6-linux-init package)
-rw-r--r--doc/index.html3
-rw-r--r--doc/s6-halt.html55
-rw-r--r--doc/s6-poweroff.html55
-rw-r--r--doc/s6-reboot.html55
-rw-r--r--doc/upgrade.html4
-rw-r--r--package/deps.mak10
-rw-r--r--package/modes3
-rw-r--r--package/targets.mak3
-rw-r--r--src/minutils/deps-exe/s6-halt1
-rw-r--r--src/minutils/deps-exe/s6-poweroff1
-rw-r--r--src/minutils/deps-exe/s6-reboot1
-rw-r--r--src/minutils/hpr.c44
-rw-r--r--src/minutils/s6-halt.c7
-rw-r--r--src/minutils/s6-poweroff.c7
-rw-r--r--src/minutils/s6-reboot.c7
-rw-r--r--src/minutils/s6ps_statparse.c3
16 files changed, 6 insertions, 253 deletions
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. </li>
<li><a href="s6-uevent-listener.html">The <tt>s6-uevent-listener</tt> program</a></li>
<li><a href="s6-uevent-spawner.html">The <tt>s6-uevent-spawner</tt> program</a></li>
<li><a href="s6-freeramdisk.html">The <tt>s6-freeramdisk</tt> program</a></li>
-<li><a href="s6-halt.html">The <tt>s6-halt</tt> program</a></li>
<li><a href="s6-hostname.html">The <tt>s6-hostname</tt> program</a></li>
<li><a href="s6-logwatch.html">The <tt>s6-logwatch</tt> program</a></li>
<li><a href="s6-mount.html">The <tt>s6-mount</tt> program</a></li>
<li><a href="s6-pivotchroot.html">The <tt>s6-pivotchroot</tt> program</a></li>
-<li><a href="s6-poweroff.html">The <tt>s6-poweroff</tt> program</a></li>
<li><a href="s6-ps.html">The <tt>s6-ps</tt> program</a></li>
-<li><a href="s6-reboot.html">The <tt>s6-reboot</tt> program</a></li>
<li><a href="s6-swapoff.html">The <tt>s6-swapoff</tt> program</a></li>
<li><a href="s6-swapon.html">The <tt>s6-swapon</tt> program</a></li>
<li><a href="s6-umount.html">The <tt>s6-umount</tt> program</a></li>
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 @@
-<html>
- <head>
- <meta name="viewport" content="width=device-width, initial-scale=1.0" />
- <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
- <meta http-equiv="Content-Language" content="en" />
- <title>s6-linux-utils: the s6-halt program</title>
- <meta name="Description" content="s6-linux-utils: the s6-halt program" />
- <meta name="Keywords" content="s6 linux administration root utilities shutdown halt poweroff reboot" />
- <!-- <link rel="stylesheet" type="text/css" href="http://skarnet.org/default.css" /> -->
- </head>
-<body>
-
-<p>
-<a href="index.html">s6-linux-utils</a><br />
-<a href="http://skarnet.org/software/">Software</a><br />
-<a href="http://skarnet.org/">skarnet.org</a>
-</p>
-
-<h1> The <tt>s6-halt</tt> program </h1>
-
-<p>
-<tt>s6-halt</tt> sends a signal to process 1 in order to halt the machine;
-or, with the <tt>-f</tt> option, it performs an immediate hard shutdown.
-</p>
-
-<h2> Interface </h2>
-
-<pre>
- s6-halt [ -h | -p | -r ] [ -f ]
-</pre>
-
-<ul>
- <li> s6-halt sends a signal to process 1. </li>
- <li> It then exits 0. </li>
-</ul>
-
-<h2> Options </h2>
-
-<ul>
- <li> <tt>-h</tt>&nbsp;: halt. The command will order a halt (i.e. the system will
-be shut down, but the power will remain up), which means
-sending a SIGUSR2 to process 1. This is the default. </li>
- <li> <tt>-p</tt>&nbsp;: poweroff. The command will order a power off, which means
-sending a SIGUSR1 to process 1. </li>
- <li> <tt>-r</tt>&nbsp;: reboot. The command will order a reboot, which means
-sending a SIGINT to process 1. </li>
- <li> <tt>-f</tt>&nbsp;: force. The command will not send any signal to process 1;
-it will just sync the filesystems then tell the kernel to halt, poweroff or reboot.
-<tt>s6-reboot -f</tt> or <tt>s6-poweroff -f</tt> should be the last program
-executed in the lifetime of a machine, at the end of the shutdown script called
-by process 1 when it receives a signal telling it to shut down. </li>
-</ul>
-
-</body>
-</html>
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 @@
-<html>
- <head>
- <meta name="viewport" content="width=device-width, initial-scale=1.0" />
- <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
- <meta http-equiv="Content-Language" content="en" />
- <title>s6-linux-utils: the s6-poweroff program</title>
- <meta name="Description" content="s6-linux-utils: the s6-poweroff program" />
- <meta name="Keywords" content="s6 linux administration root utilities shutdown halt poweroff reboot" />
- <!-- <link rel="stylesheet" type="text/css" href="http://skarnet.org/default.css" /> -->
- </head>
-<body>
-
-<p>
-<a href="index.html">s6-linux-utils</a><br />
-<a href="http://skarnet.org/software/">Software</a><br />
-<a href="http://skarnet.org/">skarnet.org</a>
-</p>
-
-<h1> The <tt>s6-poweroff</tt> program </h1>
-
-<p>
-<tt>s6-poweroff</tt> sends a signal to process 1 in order to power off the machine;
-or, with the <tt>-f</tt> option, it performs an immediate hard shutdown.
-</p>
-
-<h2> Interface </h2>
-
-<pre>
- s6-poweroff [ -h | -p | -r ] [ -f ]
-</pre>
-
-<ul>
- <li> s6-poweroff sends a signal to process 1. </li>
- <li> It then exits 0. </li>
-</ul>
-
-<h2> Options </h2>
-
-<ul>
- <li> <tt>-h</tt>&nbsp;: halt. The command will order a halt (i.e. the system will
-be shut down, but the power will remain up), which means
-sending a SIGUSR2 to process 1. </li>
- <li> <tt>-p</tt>&nbsp;: poweroff. The command will order a power off, which means
-sending a SIGUSR1 to process 1. This is the default. </li>
- <li> <tt>-r</tt>&nbsp;: reboot. The command will order a reboot, which means
-sending a SIGINT to process 1. </li>
- <li> <tt>-f</tt>&nbsp;: force. The command will not send any signal to process 1;
-it will just sync the filesystems then tell the kernel to halt, poweroff or reboot.
-<tt>s6-reboot -f</tt> or <tt>s6-poweroff -f</tt> should be the last program
-executed in the lifetime of a machine, at the end of the shutdown script called
-by process 1 when it receives a signal telling it to shut down. </li>
-</ul>
-
-</body>
-</html>
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 @@
-<html>
- <head>
- <meta name="viewport" content="width=device-width, initial-scale=1.0" />
- <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
- <meta http-equiv="Content-Language" content="en" />
- <title>s6-linux-utils: the s6-reboot program</title>
- <meta name="Description" content="s6-linux-utils: the s6-reboot program" />
- <meta name="Keywords" content="s6 linux administration root utilities shutdown halt poweroff reboot" />
- <!-- <link rel="stylesheet" type="text/css" href="http://skarnet.org/default.css" /> -->
- </head>
-<body>
-
-<p>
-<a href="index.html">s6-linux-utils</a><br />
-<a href="http://skarnet.org/software/">Software</a><br />
-<a href="http://skarnet.org/">skarnet.org</a>
-</p>
-
-<h1> The <tt>s6-reboot</tt> program </h1>
-
-<p>
-<tt>s6-reboot</tt> sends a signal to process 1 in order to reboot the machine;
-or, with the <tt>-f</tt> option, it performs an immediate reboot.
-</p>
-
-<h2> Interface </h2>
-
-<pre>
- s6-reboot [ -h | -p | -r ] [ -f ]
-</pre>
-
-<ul>
- <li> s6-reboot sends a signal to process 1. </li>
- <li> It then exits 0. </li>
-</ul>
-
-<h2> Options </h2>
-
-<ul>
- <li> <tt>-h</tt>&nbsp;: halt. The command will order a halt (i.e. the system will
-be shut down, but the power will remain up), which means
-sending a SIGUSR2 to process 1. </li>
- <li> <tt>-p</tt>&nbsp;: poweroff. The command will order a power off, which means
-sending a SIGUSR1 to process 1. </li>
- <li> <tt>-r</tt>&nbsp;: reboot. The command will order a reboot, which means
-sending a SIGINT to process 1. This is the default. </li>
- <li> <tt>-f</tt>&nbsp;: force. The command will not send any signal to process 1;
-it will just sync the filesystems then tell the kernel to halt, poweroff or reboot.
-<tt>s6-reboot -f</tt> or <tt>s6-poweroff -f</tt> should be the last program
-executed in the lifetime of a machine, at the end of the shutdown script called
-by process 1 when it receives a signal telling it to shut down. </li>
-</ul>
-
-</body>
-</html>
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 @@
<ul>
<li> skalibs dependency bumped to 2.4.0.0 </li>
+ <li> s6-halt, s6-poweroff and s6-reboot are not provided
+by this package anymore: they're now a part of the
+<a href="http://skarnet.org/software/s6-linux-init/">s6-linux-init</a>
+package. </li>
</ul>
<h2> in 2.1.0.0 </h2>
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 <unistd.h>
-#include <signal.h>
-#include <sys/reboot.h>
-#include <skalibs/strerr2.h>
-#include <skalibs/sgetopt.h>
-
-#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 ;
}