* [gentoo-commits] proj/openrc:master commit in: scripts/
@ 2011-11-17 18:28 William Hubbs
0 siblings, 0 replies; 14+ messages in thread
From: William Hubbs @ 2011-11-17 18:28 UTC (permalink / raw
To: gentoo-commits
commit: 260b61e9d87510b869f2b7b8fefd281ea695f88e
Author: Alessio Ababilov <ilovedevlinux <AT> gmail <DOT> com>
AuthorDate: Thu Nov 17 15:48:38 2011 +0000
Commit: William Hubbs <williamh <AT> gentoo <DOT> org>
CommitDate: Thu Nov 17 17:55:44 2011 +0000
URL: http://git.overlays.gentoo.org/gitweb/?p=proj/openrc.git;a=commit;h=260b61e9
on_ac_power: Fix AC adapter presence recognition
On several machines, a file corresponding to AC adapter can be named
ADP1. The on_ac_power script checked for AC*, which does not match
ADP1, so the script always considered the adapter to be off.
X-Gentoo-Bug: 380933
X-Gentoo-Bug-URL: http://bugs.gentoo.org/show_bug.cgi?id=380933
---
scripts/on_ac_power | 8 ++++----
1 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/scripts/on_ac_power b/scripts/on_ac_power
index 3655b83..5dd516f 100755
--- a/scripts/on_ac_power
+++ b/scripts/on_ac_power
@@ -3,14 +3,14 @@
# Copyright (c) 2007-2009 Roy Marples <roy@marples.name>
# Exit 0 if on AC power, 1 if not and 255 if we don't know how to work it out
-if [ -f /proc/acpi/ac_adapter/AC*/state ]; then
- cat /proc/acpi/ac_adapter/AC*/state | while read line; do
+if [ -f /proc/acpi/ac_adapter/*/state ]; then
+ cat /proc/acpi/ac_adapter/*/state | while read line; do
case "$line" in
"state:"*"off-line") exit 128;;
esac
done
-elif [ -f /sys/class/power_supply/AC*/online ]; then
- cat /sys/class/power_supply/AC*/online | while read line; do
+elif [ -f /sys/class/power_supply/*/online ]; then
+ cat /sys/class/power_supply/*/online | while read line; do
[ "${line}" = 0 ] && exit 128
done
elif [ -f /proc/pmu/info ]; then
^ permalink raw reply related [flat|nested] 14+ messages in thread
* [gentoo-commits] proj/openrc:master commit in: scripts/
@ 2017-01-09 2:43 William Hubbs
0 siblings, 0 replies; 14+ messages in thread
From: William Hubbs @ 2017-01-09 2:43 UTC (permalink / raw
To: gentoo-commits
commit: e2e652e469efa5f3ebcd69828ff16d8f5ad3f1b8
Author: William Hubbs <w.d.hubbs <AT> gmail <DOT> com>
AuthorDate: Mon Jan 9 02:42:26 2017 +0000
Commit: William Hubbs <williamh <AT> gentoo <DOT> org>
CommitDate: Mon Jan 9 02:42:26 2017 +0000
URL: https://gitweb.gentoo.org/proj/openrc.git/commit/?id=e2e652e4
scripts: do not substitute for @SHELL@ in rc-sstat
scripts/Makefile | 1 -
scripts/{rc-sstat.in => rc-sstat} | 2 +-
2 files changed, 1 insertion(+), 2 deletions(-)
diff --git a/scripts/Makefile b/scripts/Makefile
index 9a66c65..f4e3c68 100644
--- a/scripts/Makefile
+++ b/scripts/Makefile
@@ -6,7 +6,6 @@ BIN= on_ac_power
INSTALLAFTER = _installafter
ifeq (${OS},Linux)
-SRCS+= rc-sstat.in
BIN+= rc-sstat
endif
diff --git a/scripts/rc-sstat.in b/scripts/rc-sstat
old mode 100644
new mode 100755
similarity index 99%
rename from scripts/rc-sstat.in
rename to scripts/rc-sstat
index a204dbd..bcd0ae2
--- a/scripts/rc-sstat.in
+++ b/scripts/rc-sstat
@@ -1,4 +1,4 @@
-#!@SHELL@
+#!/bin/sh
# Copyright (c) 2015 The OpenRC Authors.
# See the Authors file at the top-level directory of this distribution and
# https://github.com/OpenRC/openrc/blob/master/AUTHORS
^ permalink raw reply related [flat|nested] 14+ messages in thread
* [gentoo-commits] proj/openrc:master commit in: scripts/
@ 2017-01-26 21:40 William Hubbs
0 siblings, 0 replies; 14+ messages in thread
From: William Hubbs @ 2017-01-26 21:40 UTC (permalink / raw
To: gentoo-commits
commit: b693af90556ac9b055ba5c6e589066c1e08b2146
Author: William Hubbs <w.d.hubbs <AT> gmail <DOT> com>
AuthorDate: Thu Jan 26 21:39:19 2017 +0000
Commit: William Hubbs <williamh <AT> gentoo <DOT> org>
CommitDate: Thu Jan 26 21:39:19 2017 +0000
URL: https://gitweb.gentoo.org/proj/openrc.git/commit/?id=b693af90
Revert "scripts: do not substitute for @SHELL@ in rc-sstat"
This reverts commit e2e652e469efa5f3ebcd69828ff16d8f5ad3f1b8.
scripts/Makefile | 1 +
scripts/{rc-sstat => rc-sstat.in} | 2 +-
2 files changed, 2 insertions(+), 1 deletion(-)
diff --git a/scripts/Makefile b/scripts/Makefile
index f4e3c68..9a66c65 100644
--- a/scripts/Makefile
+++ b/scripts/Makefile
@@ -6,6 +6,7 @@ BIN= on_ac_power
INSTALLAFTER = _installafter
ifeq (${OS},Linux)
+SRCS+= rc-sstat.in
BIN+= rc-sstat
endif
diff --git a/scripts/rc-sstat b/scripts/rc-sstat.in
old mode 100755
new mode 100644
similarity index 99%
rename from scripts/rc-sstat
rename to scripts/rc-sstat.in
index bcd0ae2..a204dbd
--- a/scripts/rc-sstat
+++ b/scripts/rc-sstat.in
@@ -1,4 +1,4 @@
-#!/bin/sh
+#!@SHELL@
# Copyright (c) 2015 The OpenRC Authors.
# See the Authors file at the top-level directory of this distribution and
# https://github.com/OpenRC/openrc/blob/master/AUTHORS
^ permalink raw reply related [flat|nested] 14+ messages in thread
* [gentoo-commits] proj/openrc:master commit in: scripts/
@ 2017-02-22 20:53 William Hubbs
0 siblings, 0 replies; 14+ messages in thread
From: William Hubbs @ 2017-02-22 20:53 UTC (permalink / raw
To: gentoo-commits
commit: f6ea16159ec8583a6f2182578334aa00578cb080
Author: William Hubbs <w.d.hubbs <AT> gmail <DOT> com>
AuthorDate: Wed Feb 22 20:25:02 2017 +0000
Commit: William Hubbs <williamh <AT> gentoo <DOT> org>
CommitDate: Wed Feb 22 20:25:02 2017 +0000
URL: https://gitweb.gentoo.org/proj/openrc.git/commit/?id=f6ea1615
scripts: make sure the rc-sstat symlink is always replaced
scripts/Makefile | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/scripts/Makefile b/scripts/Makefile
index 9a66c65d..13b8024f 100644
--- a/scripts/Makefile
+++ b/scripts/Makefile
@@ -13,7 +13,7 @@ endif
_installafter:
ifeq (${OS},Linux)
${INSTALL} -d ${DESTDIR}${SBINDIR}
- ln -s ${DIR}/rc-sstat ${DESTDIR}/${SBINDIR}/rc-sstat
+ ln -sf ${DIR}/rc-sstat ${DESTDIR}/${SBINDIR}/rc-sstat
endif
include ${MK}/scripts.mk
^ permalink raw reply related [flat|nested] 14+ messages in thread
* [gentoo-commits] proj/openrc:master commit in: scripts/
@ 2017-06-07 16:34 William Hubbs
0 siblings, 0 replies; 14+ messages in thread
From: William Hubbs @ 2017-06-07 16:34 UTC (permalink / raw
To: gentoo-commits
commit: 84d140a1f6abf95a4170d13527152d3ab14e6613
Author: William Hubbs <w.d.hubbs <AT> gmail <DOT> com>
AuthorDate: Wed Jun 7 15:59:42 2017 +0000
Commit: William Hubbs <williamh <AT> gentoo <DOT> org>
CommitDate: Wed Jun 7 15:59:42 2017 +0000
URL: https://gitweb.gentoo.org/proj/openrc.git/commit/?id=84d140a1
scripts/shutdown: pass --single to openrc-shutdown
Sysvinit shutdown has a default of single user mode, but openrc-shutdown
makes you choose a default action. Because of this, the shutdown wrapper
needs to pass --single to openrc-shutdown.
scripts/shutdown.in | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/scripts/shutdown.in b/scripts/shutdown.in
index 6bb65260..4f6ba637 100644
--- a/scripts/shutdown.in
+++ b/scripts/shutdown.in
@@ -1,3 +1,8 @@
#!@SHELL@
-exec @SBINDIR@/openrc-shutdown "$@"
+args="$@"
+case "$@" in
+ *--single*|*-s*) args="$@" ;;
+ *) args="--single $@";;
+esac
+exec @SBINDIR@/openrc-shutdown "$args"
^ permalink raw reply related [flat|nested] 14+ messages in thread
* [gentoo-commits] proj/openrc:master commit in: scripts/
@ 2017-06-12 15:41 William Hubbs
0 siblings, 0 replies; 14+ messages in thread
From: William Hubbs @ 2017-06-12 15:41 UTC (permalink / raw
To: gentoo-commits
commit: 199a210d2fbc524c9c400a06f832dabffd7ed1b3
Author: udeved <artoo <AT> manjaro <DOT> org>
AuthorDate: Fri Jun 9 21:03:20 2017 +0000
Commit: William Hubbs <williamh <AT> gentoo <DOT> org>
CommitDate: Mon Jun 12 15:39:44 2017 +0000
URL: https://gitweb.gentoo.org/proj/openrc.git/commit/?id=199a210d
scripts/Makefile: make symlinks absolute instead of relative
This closes #142.
scripts/Makefile | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/scripts/Makefile b/scripts/Makefile
index 5cca07bc..b0af29a9 100644
--- a/scripts/Makefile
+++ b/scripts/Makefile
@@ -17,12 +17,12 @@ endif
_installafter:
ifeq (${OS},Linux)
${INSTALL} -d ${DESTDIR}${SBINDIR}
- ln -sf ../${DIR}/rc-sstat ${DESTDIR}/${SBINDIR}/rc-sstat
+ ln -sf ${DIR}/rc-sstat ${DESTDIR}/${SBINDIR}/rc-sstat
ifeq (${MKSYSVINIT},yes)
- ln -sf ../${DIR}/halt ${DESTDIR}/${SBINDIR}/halt
- ln -sf ../${DIR}/poweroff ${DESTDIR}/${SBINDIR}/poweroff
- ln -sf ../${DIR}/reboot ${DESTDIR}/${SBINDIR}/reboot
- ln -sf ../${DIR}/shutdown ${DESTDIR}/${SBINDIR}/shutdown
+ ln -sf ${DIR}/halt ${DESTDIR}/${SBINDIR}/halt
+ ln -sf ${DIR}/poweroff ${DESTDIR}/${SBINDIR}/poweroff
+ ln -sf ${DIR}/reboot ${DESTDIR}/${SBINDIR}/reboot
+ ln -sf openrc-shutdown ${DESTDIR}/${SBINDIR}/shutdown
ln -sf openrc-init ${DESTDIR}/${SBINDIR}/init
endif
endif
^ permalink raw reply related [flat|nested] 14+ messages in thread
* [gentoo-commits] proj/openrc:master commit in: scripts/
@ 2017-06-12 15:41 William Hubbs
0 siblings, 0 replies; 14+ messages in thread
From: William Hubbs @ 2017-06-12 15:41 UTC (permalink / raw
To: gentoo-commits
commit: 5b7667af32effddf867a5d021c66d43f0645d374
Author: udeved <artoo <AT> manjaro <DOT> org>
AuthorDate: Fri Jun 9 19:58:59 2017 +0000
Commit: William Hubbs <williamh <AT> gentoo <DOT> org>
CommitDate: Mon Jun 12 15:38:47 2017 +0000
URL: https://gitweb.gentoo.org/proj/openrc.git/commit/?id=5b7667af
scripts/Makefile: respect SBINDIR with MKSYSVINIT
This is for #142.
scripts/Makefile | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/scripts/Makefile b/scripts/Makefile
index faa46b0e..5cca07bc 100644
--- a/scripts/Makefile
+++ b/scripts/Makefile
@@ -19,11 +19,11 @@ ifeq (${OS},Linux)
${INSTALL} -d ${DESTDIR}${SBINDIR}
ln -sf ../${DIR}/rc-sstat ${DESTDIR}/${SBINDIR}/rc-sstat
ifeq (${MKSYSVINIT},yes)
- ln -sf ../${DIR}/halt ${DESTDIR}/sbin/halt
- ln -sf ../${DIR}/poweroff ${DESTDIR}/sbin/poweroff
- ln -sf ../${DIR}/reboot ${DESTDIR}/sbin/reboot
- ln -sf ../${DIR}/shutdown ${DESTDIR}/sbin/shutdown
- ln -sf openrc-init ${DESTDIR}/sbin/init
+ ln -sf ../${DIR}/halt ${DESTDIR}/${SBINDIR}/halt
+ ln -sf ../${DIR}/poweroff ${DESTDIR}/${SBINDIR}/poweroff
+ ln -sf ../${DIR}/reboot ${DESTDIR}/${SBINDIR}/reboot
+ ln -sf ../${DIR}/shutdown ${DESTDIR}/${SBINDIR}/shutdown
+ ln -sf openrc-init ${DESTDIR}/${SBINDIR}/init
endif
endif
^ permalink raw reply related [flat|nested] 14+ messages in thread
* [gentoo-commits] proj/openrc:master commit in: scripts/
@ 2017-06-12 23:01 William Hubbs
0 siblings, 0 replies; 14+ messages in thread
From: William Hubbs @ 2017-06-12 23:01 UTC (permalink / raw
To: gentoo-commits
commit: 2f81c100afdf45ebf787dfc5d3261aa6055640e4
Author: William Hubbs <w.d.hubbs <AT> gmail <DOT> com>
AuthorDate: Mon Jun 12 17:12:50 2017 +0000
Commit: William Hubbs <williamh <AT> gentoo <DOT> org>
CommitDate: Mon Jun 12 17:12:50 2017 +0000
URL: https://gitweb.gentoo.org/proj/openrc.git/commit/?id=2f81c100
Fix link to shutdown for MKSYSVINIT=yes
scripts/Makefile | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/scripts/Makefile b/scripts/Makefile
index b0af29a9..d2215b34 100644
--- a/scripts/Makefile
+++ b/scripts/Makefile
@@ -22,7 +22,7 @@ ifeq (${MKSYSVINIT},yes)
ln -sf ${DIR}/halt ${DESTDIR}/${SBINDIR}/halt
ln -sf ${DIR}/poweroff ${DESTDIR}/${SBINDIR}/poweroff
ln -sf ${DIR}/reboot ${DESTDIR}/${SBINDIR}/reboot
- ln -sf openrc-shutdown ${DESTDIR}/${SBINDIR}/shutdown
+ ln -sf ${DIR}/shutdown ${DESTDIR}/${SBINDIR}/shutdown
ln -sf openrc-init ${DESTDIR}/${SBINDIR}/init
endif
endif
^ permalink raw reply related [flat|nested] 14+ messages in thread
* [gentoo-commits] proj/openrc:master commit in: scripts/
@ 2017-06-12 23:01 William Hubbs
0 siblings, 0 replies; 14+ messages in thread
From: William Hubbs @ 2017-06-12 23:01 UTC (permalink / raw
To: gentoo-commits
commit: dcc686e42b406d63d52ef75de9a326f67d0a06c9
Author: William Hubbs <w.d.hubbs <AT> gmail <DOT> com>
AuthorDate: Mon Jun 12 17:24:18 2017 +0000
Commit: William Hubbs <williamh <AT> gentoo <DOT> org>
CommitDate: Mon Jun 12 17:24:18 2017 +0000
URL: https://gitweb.gentoo.org/proj/openrc.git/commit/?id=dcc686e4
scripts/shutdown: fix arguments to be sysvinit shutdown compatible
This fixes #140.
scripts/shutdown.in | 17 +++++++++++++----
1 file changed, 13 insertions(+), 4 deletions(-)
diff --git a/scripts/shutdown.in b/scripts/shutdown.in
index 4f6ba637..4a3d9fd1 100644
--- a/scripts/shutdown.in
+++ b/scripts/shutdown.in
@@ -1,8 +1,17 @@
#!@SHELL@
-args="$@"
-case "$@" in
- *--single*|*-s*) args="$@" ;;
- *) args="--single $@";;
+args=
+for x; do
+ case "$x" in
+ -h) args=" ${args} --halt" ;;
+ *) args=" ${args} ${x} " ;;
+ esac
+done
+
+case "$args" in
+ *-h|--halt*) ;;
+ *-s|--single*) ;;
+ *) args=" --single ${args}" ;;
esac
+
exec @SBINDIR@/openrc-shutdown "$args"
^ permalink raw reply related [flat|nested] 14+ messages in thread
* [gentoo-commits] proj/openrc:master commit in: scripts/
@ 2017-06-12 23:01 William Hubbs
0 siblings, 0 replies; 14+ messages in thread
From: William Hubbs @ 2017-06-12 23:01 UTC (permalink / raw
To: gentoo-commits
commit: 1e837d596e483ceb5cec177a6c7faff24a42384b
Author: William Hubbs <w.d.hubbs <AT> gmail <DOT> com>
AuthorDate: Mon Jun 12 22:58:18 2017 +0000
Commit: William Hubbs <williamh <AT> gentoo <DOT> org>
CommitDate: Mon Jun 12 22:58:18 2017 +0000
URL: https://gitweb.gentoo.org/proj/openrc.git/commit/?id=1e837d59
fix argument parsing for the sysvinit shutdown wrapper
This fixes #140.
scripts/shutdown.in | 26 +++++++++++++++-----------
1 file changed, 15 insertions(+), 11 deletions(-)
diff --git a/scripts/shutdown.in b/scripts/shutdown.in
index 4a3d9fd1..69a4a12a 100644
--- a/scripts/shutdown.in
+++ b/scripts/shutdown.in
@@ -1,17 +1,21 @@
#!@SHELL@
-args=
-for x; do
- case "$x" in
- -h) args=" ${args} --halt" ;;
- *) args=" ${args} ${x} " ;;
+poweroff_arg=
+while getopts :HhPr opt; do
+ case "$opt" in
+ h|P) poweroff_arg=--poweroff ;;
+ H) poweroff_arg=--halt ;;
+ r) poweroff_arg=--reboot ;;
+ \?) printf "${0##*/}: invalid option ${optarg}\n" >&2
+ exit 1
+ ;;
esac
done
+shift $((OPTIND-1))
-case "$args" in
- *-h|--halt*) ;;
- *-s|--single*) ;;
- *) args=" --single ${args}" ;;
-esac
+if [ -z "${poweroff_arg}" ]; then
+ poweroff_arg=--single
+fi
-exec @SBINDIR@/openrc-shutdown "$args"
+echo @SBINDIR@/openrc-shutdown ${poweroff_arg} ${@}
+exec @SBINDIR@/openrc-shutdown ${poweroff_arg} ${@}
^ permalink raw reply related [flat|nested] 14+ messages in thread
* [gentoo-commits] proj/openrc:master commit in: scripts/
@ 2017-07-10 23:37 William Hubbs
0 siblings, 0 replies; 14+ messages in thread
From: William Hubbs @ 2017-07-10 23:37 UTC (permalink / raw
To: gentoo-commits
commit: 9812ce5b8dc22fe36cc7bf75cf6e62db204ece3d
Author: William Hubbs <w.d.hubbs <AT> gmail <DOT> com>
AuthorDate: Mon Jul 10 23:23:01 2017 +0000
Commit: William Hubbs <williamh <AT> gentoo <DOT> org>
CommitDate: Mon Jul 10 23:36:24 2017 +0000
URL: https://gitweb.gentoo.org/proj/openrc.git/commit/?id=9812ce5b
fix halt wrapper so it is sysvinit compatible
This makes the halt wrapper sysvinit compatible. It ignores several
command line switches which are not currently implemented; however,
those can be implemented if we need to do so.
This fixes https://github.com/openrc/openrc/issues/146.
scripts/halt.in | 23 ++++++++++++++++++++++-
1 file changed, 22 insertions(+), 1 deletion(-)
diff --git a/scripts/halt.in b/scripts/halt.in
index 68b13be1..257cc2a7 100644
--- a/scripts/halt.in
+++ b/scripts/halt.in
@@ -1,3 +1,24 @@
#!@SHELL@
-exec @SBINDIR@/openrc-shutdown --halt "$@"
+option_arg=
+poweroff_arg=
+while getopts :nwdfiph opt; do
+ case "$opt" in
+ n) ;;
+ w) poweroff_arg=--write-only ;;
+ d) option_arg=--no-write ;;
+ f) ;;
+ i) ;;
+ p) poweroff_arg=--poweroff ;;
+ [?]) printf "%s\n" "${0##*/}: invalid command line option" >&2
+ exit 1
+ ;;
+ esac
+done
+shift $((OPTIND-1))
+
+if [ -z "${poweroff_arg}" ]; then
+ poweroff_arg=--poweroff
+fi
+
+exec @SBINDIR@/openrc-shutdown ${option_arg} ${poweroff_arg} "$@"
^ permalink raw reply related [flat|nested] 14+ messages in thread
* [gentoo-commits] proj/openrc:master commit in: scripts/
@ 2017-07-11 16:14 William Hubbs
0 siblings, 0 replies; 14+ messages in thread
From: William Hubbs @ 2017-07-11 16:14 UTC (permalink / raw
To: gentoo-commits
commit: 7e0f76e0adc545c74a8332a6ef0811d2aa62cb81
Author: William Hubbs <w.d.hubbs <AT> gmail <DOT> com>
AuthorDate: Tue Jul 11 16:09:52 2017 +0000
Commit: William Hubbs <williamh <AT> gentoo <DOT> org>
CommitDate: Tue Jul 11 16:10:46 2017 +0000
URL: https://gitweb.gentoo.org/proj/openrc.git/commit/?id=7e0f76e0
fix sysvinit compatibility for poweroff wrapper
scripts/poweroff.in | 22 +++++++++++++++++++++-
1 file changed, 21 insertions(+), 1 deletion(-)
diff --git a/scripts/poweroff.in b/scripts/poweroff.in
index 91736605..5632f679 100644
--- a/scripts/poweroff.in
+++ b/scripts/poweroff.in
@@ -1,3 +1,23 @@
#!@SHELL@
-exec @SBINDIR@/openrc-shutdown --poweroff "$@"
+option_arg=
+poweroff_arg=
+while getopts :nwdfiph opt; do
+ case "$opt" in
+ n) ;;
+ w) poweroff_arg=--write-only ;;
+ d) option_arg=--no-write ;;
+ f) ;;
+ i) ;;
+ [?]) printf "%s\n" "${0##*/}: invalid command line option" >&2
+ exit 1
+ ;;
+ esac
+done
+shift $((OPTIND-1))
+
+if [ -z "${poweroff_arg}" ]; then
+ poweroff_arg=--poweroff
+fi
+
+exec @SBINDIR@/openrc-shutdown ${option_arg} ${poweroff_arg} "$@"
^ permalink raw reply related [flat|nested] 14+ messages in thread
* [gentoo-commits] proj/openrc:master commit in: scripts/
@ 2017-07-11 17:06 William Hubbs
0 siblings, 0 replies; 14+ messages in thread
From: William Hubbs @ 2017-07-11 17:06 UTC (permalink / raw
To: gentoo-commits
commit: 03a461ac0ee34b7900868cdea624c6fd868b1656
Author: William Hubbs <w.d.hubbs <AT> gmail <DOT> com>
AuthorDate: Tue Jul 11 16:53:23 2017 +0000
Commit: William Hubbs <williamh <AT> gentoo <DOT> org>
CommitDate: Tue Jul 11 16:53:23 2017 +0000
URL: https://gitweb.gentoo.org/proj/openrc.git/commit/?id=03a461ac
fix sysvinit compatibility for reboot wrapper
scripts/reboot.in | 24 +++++++++++++++++++++++-
1 file changed, 23 insertions(+), 1 deletion(-)
diff --git a/scripts/reboot.in b/scripts/reboot.in
index 4da78bb7..c805ceb2 100644
--- a/scripts/reboot.in
+++ b/scripts/reboot.in
@@ -1,3 +1,25 @@
#!@SHELL@
-exec @SBINDIR@/openrc-shutdown --reboot "$@"
+option_arg=
+poweroff_arg=
+while getopts :nwdfhik opt; do
+ case "$opt" in
+ n) ;;
+ w) poweroff_arg=--write-only ;;
+ d) option_arg=--no-write ;;
+ f) ;;
+ h) ;;
+ i) ;;
+ k) poweroff_arg=--kexec ;;
+ [?]) printf "%s\n" "${0##*/}: invalid command line option" >&2
+ exit 1
+ ;;
+ esac
+done
+shift $((OPTIND-1))
+
+if [ -z "${poweroff_arg}" ]; then
+ poweroff_arg=--reboot
+fi
+
+exec @SBINDIR@/openrc-shutdown ${option_arg} ${poweroff_arg} "$@"
^ permalink raw reply related [flat|nested] 14+ messages in thread
* [gentoo-commits] proj/openrc:master commit in: scripts/
@ 2017-07-11 19:57 William Hubbs
0 siblings, 0 replies; 14+ messages in thread
From: William Hubbs @ 2017-07-11 19:57 UTC (permalink / raw
To: gentoo-commits
commit: e7807b3136d8993805082320784460f5059e6275
Author: William Hubbs <w.d.hubbs <AT> gmail <DOT> com>
AuthorDate: Tue Jul 11 19:41:29 2017 +0000
Commit: William Hubbs <williamh <AT> gentoo <DOT> org>
CommitDate: Tue Jul 11 19:41:29 2017 +0000
URL: https://gitweb.gentoo.org/proj/openrc.git/commit/?id=e7807b31
fix sysvinit compatibility for shutdown wrapper
scripts/shutdown.in | 28 ++++++++++++++++++----------
1 file changed, 18 insertions(+), 10 deletions(-)
diff --git a/scripts/shutdown.in b/scripts/shutdown.in
index 69a4a12a..7d68bf09 100644
--- a/scripts/shutdown.in
+++ b/scripts/shutdown.in
@@ -1,21 +1,29 @@
#!@SHELL@
-poweroff_arg=
-while getopts :HhPr opt; do
+shutdown_arg=
+while getopts :akrhPHfFnct: opt; do
case "$opt" in
- h|P) poweroff_arg=--poweroff ;;
- H) poweroff_arg=--halt ;;
- r) poweroff_arg=--reboot ;;
- \?) printf "${0##*/}: invalid option ${optarg}\n" >&2
+ a) ;;
+ k) ;;
+ r) shutdown_arg=--reboot ;;
+ h) shutdown_arg=--halt ;;
+ P) shutdown_arg=--poweroff ;;
+ H) shutdown_arg=--halt ;;
+ f) ;;
+ F) ;;
+ n) ;;
+ c) ;;
+ t) ;;
+ [?]) printf "%s\n" "${0##*/}: invalid command line option" >&2
exit 1
;;
esac
done
shift $((OPTIND-1))
-if [ -z "${poweroff_arg}" ]; then
- poweroff_arg=--single
+if [ -z "${shutdown_arg}" ]; then
+ shutdown_arg=--single
fi
-echo @SBINDIR@/openrc-shutdown ${poweroff_arg} ${@}
-exec @SBINDIR@/openrc-shutdown ${poweroff_arg} ${@}
+echo @SBINDIR@/openrc-shutdown ${shutdown_arg} "$@"
+exec @SBINDIR@/openrc-shutdown ${shutdown_arg} "$@"
^ permalink raw reply related [flat|nested] 14+ messages in thread
end of thread, other threads:[~2017-07-11 19:57 UTC | newest]
Thread overview: 14+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-06-12 15:41 [gentoo-commits] proj/openrc:master commit in: scripts/ William Hubbs
-- strict thread matches above, loose matches on Subject: below --
2017-07-11 19:57 William Hubbs
2017-07-11 17:06 William Hubbs
2017-07-11 16:14 William Hubbs
2017-07-10 23:37 William Hubbs
2017-06-12 23:01 William Hubbs
2017-06-12 23:01 William Hubbs
2017-06-12 23:01 William Hubbs
2017-06-12 15:41 William Hubbs
2017-06-07 16:34 William Hubbs
2017-02-22 20:53 William Hubbs
2017-01-26 21:40 William Hubbs
2017-01-09 2:43 William Hubbs
2011-11-17 18:28 William Hubbs
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox