* [gentoo-commits] proj/openrc:0.27.x commit in: scripts/
@ 2017-06-12 23:28 William Hubbs
0 siblings, 0 replies; 5+ messages in thread
From: William Hubbs @ 2017-06-12 23:28 UTC (permalink / raw
To: gentoo-commits
commit: d47288d838a45b89abf944f7ddf969372b54a8e1
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 23:08:14 2017 +0000
URL: https://gitweb.gentoo.org/proj/openrc.git/commit/?id=d47288d8
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] 5+ messages in thread
* [gentoo-commits] proj/openrc:0.27.x commit in: scripts/
@ 2017-06-12 23:28 William Hubbs
0 siblings, 0 replies; 5+ messages in thread
From: William Hubbs @ 2017-06-12 23:28 UTC (permalink / raw
To: gentoo-commits
commit: a4b9c972828089dccea16aa92371ccda02717fab
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 23:08:14 2017 +0000
URL: https://gitweb.gentoo.org/proj/openrc.git/commit/?id=a4b9c972
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] 5+ messages in thread
* [gentoo-commits] proj/openrc:0.27.x commit in: scripts/
@ 2017-06-12 23:28 William Hubbs
0 siblings, 0 replies; 5+ messages in thread
From: William Hubbs @ 2017-06-12 23:28 UTC (permalink / raw
To: gentoo-commits
commit: 88e995482855356b79dc670420d31642162aaddb
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 23:08:14 2017 +0000
URL: https://gitweb.gentoo.org/proj/openrc.git/commit/?id=88e99548
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] 5+ messages in thread
* [gentoo-commits] proj/openrc:0.27.x commit in: scripts/
@ 2017-06-12 23:28 William Hubbs
0 siblings, 0 replies; 5+ messages in thread
From: William Hubbs @ 2017-06-12 23:28 UTC (permalink / raw
To: gentoo-commits
commit: 1cf0c98514c6b08dd56c363e89007e791dbc0589
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 23:08:14 2017 +0000
URL: https://gitweb.gentoo.org/proj/openrc.git/commit/?id=1cf0c985
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] 5+ messages in thread
* [gentoo-commits] proj/openrc:0.27.x commit in: scripts/
@ 2017-06-12 23:28 William Hubbs
0 siblings, 0 replies; 5+ messages in thread
From: William Hubbs @ 2017-06-12 23:28 UTC (permalink / raw
To: gentoo-commits
commit: fe5567bb04b3bacfb473d707e3eb936571c06661
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 23:08:14 2017 +0000
URL: https://gitweb.gentoo.org/proj/openrc.git/commit/?id=fe5567bb
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] 5+ messages in thread
end of thread, other threads:[~2017-06-12 23:29 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-06-12 23:28 [gentoo-commits] proj/openrc:0.27.x commit in: scripts/ William Hubbs
-- strict thread matches above, loose matches on Subject: below --
2017-06-12 23:28 William Hubbs
2017-06-12 23:28 William Hubbs
2017-06-12 23:28 William Hubbs
2017-06-12 23: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