* [gentoo-commits] proj/openrc:openrc-0.11.x commit in: sh/
@ 2012-10-22 5:15 William Hubbs
0 siblings, 0 replies; 8+ messages in thread
From: William Hubbs @ 2012-10-22 5:15 UTC (permalink / raw
To: gentoo-commits
commit: aa34435cc8c17618facb6e68c8380f0026d79b8e
Author: Andrew Gregory <andrew.gregory.8 <AT> gmail <DOT> com>
AuthorDate: Thu Oct 11 18:34:20 2012 +0000
Commit: William Hubbs <williamh <AT> gentoo <DOT> org>
CommitDate: Mon Oct 22 05:12:27 2012 +0000
URL: http://git.overlays.gentoo.org/gitweb/?p=proj/openrc.git;a=commit;h=aa34435c
tmpfilesd: parse arguments with spaces
systemd allows the final arg in tmpfiles to contain spaces. Using the read()
call to set the variables includes all trailing components in $arg so it
doesn't get cut off.
Signed-off-by: Andrew Gregory <andrew.gregory.8 <AT> gmail.com>
---
sh/tmpfiles.sh.in | 32 ++++++++++----------------------
1 files changed, 10 insertions(+), 22 deletions(-)
diff --git a/sh/tmpfiles.sh.in b/sh/tmpfiles.sh.in
index 57cedbe..ae7b7ca 100755
--- a/sh/tmpfiles.sh.in
+++ b/sh/tmpfiles.sh.in
@@ -253,46 +253,34 @@ for FILE in $tmpfiles_d ; do
# XXX: Upstream says whitespace is NOT permitted in the Path argument.
# But IS allowed when globs are expanded for the x/r/R/z/Z types.
- while read line; do
+ while read cmd path mode uid gid age arg; do
LINENUM=$(( LINENUM+1 ))
- # This will skip over comments and empty lines
- set -- $line
-
# Unless we have both command and path, skip this line.
- if [ -z "$1" -o -z "$2" ]; then
+ if [ -z "$cmd" -o -z "$path" ]; then
continue
fi
# whine about invalid entries
- case $1 in
+ case $cmd in
f|F|w|d|D|p|L|c|b|x|r|R|z|Z) ;;
\#) continue ;;
*) warninvalid ; continue ;;
esac
- cmd=$1
- path=$2
-
# fall back on defaults when parameters are passed as '-'
- if [ "$3" = '-' -o "$3" = '' ]; then
- case ${1} in
+ if [ "$mode" = '-' -o "$mode" = '' ]; then
+ case "$cmd" in
p|f|F) mode=0644 ;;
d|D) mode=0755 ;;
z|Z|x|r|R|L) ;;
esac
- else
- mode=$3
fi
- uid=$4
- gid=$5
- age=$6
- arg=$7
-
- [ "${4}" = '-' -o "${4}" = '' ] && uid=0
- [ "${5}" = '-' -o "${5}" = '' ] && gid=0
- [ "${6}" = '-' -o "${6}" = '' ] && age=0
- [ "${7}" = '-' -o "${7}" = '' ] && arg=''
+
+ [ "$uid" = '-' -o "$uid" = '' ] && uid=0
+ [ "$gid" = '-' -o "$gid" = '' ] && gid=0
+ [ "$age" = '-' -o "$age" = '' ] && age=0
+ [ "$arg" = '-' -o "$arg" = '' ] && arg=''
set -- "$path" "$mode" "$uid" "$gid" "$age" "$arg"
[ "$VERBOSE" -eq "1" ] && echo _$cmd "$@"
^ permalink raw reply related [flat|nested] 8+ messages in thread
* [gentoo-commits] proj/openrc:openrc-0.11.x commit in: sh/
@ 2012-12-07 16:15 William Hubbs
0 siblings, 0 replies; 8+ messages in thread
From: William Hubbs @ 2012-12-07 16:15 UTC (permalink / raw
To: gentoo-commits
commit: 0884271bdd578c3bbf309f158a8ca1410d6be3b1
Author: William Hubbs <w.d.hubbs <AT> gmail <DOT> com>
AuthorDate: Fri Dec 7 15:39:12 2012 +0000
Commit: William Hubbs <williamh <AT> gentoo <DOT> org>
CommitDate: Fri Dec 7 15:53:28 2012 +0000
URL: http://git.overlays.gentoo.org/gitweb/?p=proj/openrc.git;a=commit;h=0884271b
init-linux: Do not remove the $rc_libexecdir/init.d directory
Reported-by: toralf.foerster <AT> gmx.de
X-Gentoo-Bug: 446342
X-Gentoo-Bug-URL: https://bugs.gentoo.org/show_bug.cgi?id=446342
---
sh/init.sh.Linux.in | 4 ----
1 files changed, 0 insertions(+), 4 deletions(-)
diff --git a/sh/init.sh.Linux.in b/sh/init.sh.Linux.in
index f45eae1..9b13aad 100644
--- a/sh/init.sh.Linux.in
+++ b/sh/init.sh.Linux.in
@@ -88,9 +88,5 @@ if [ -e "$RC_LIBEXECDIR"/cache/deptree ]; then
cp -p "$RC_LIBEXECDIR"/cache/* "$RC_SVCDIR" 2>/dev/null
fi
-if [ -e "$RC_LIBEXECDIR"/init.d ]; then
- rm -rf "$RC_LIBEXECDIR"/init.d
-fi
-
echo sysinit >"$RC_SVCDIR"/softlevel
exit 0
^ permalink raw reply related [flat|nested] 8+ messages in thread
* [gentoo-commits] proj/openrc:openrc-0.11.x commit in: sh/
@ 2012-12-06 23:58 William Hubbs
0 siblings, 0 replies; 8+ messages in thread
From: William Hubbs @ 2012-12-06 23:58 UTC (permalink / raw
To: gentoo-commits
commit: 9c4582fbd7674269037d07db9f8432377b747dd2
Author: William Hubbs <w.d.hubbs <AT> gmail <DOT> com>
AuthorDate: Thu Dec 6 22:43:24 2012 +0000
Commit: William Hubbs <williamh <AT> gentoo <DOT> org>
CommitDate: Thu Dec 6 23:57:00 2012 +0000
URL: http://git.overlays.gentoo.org/gitweb/?p=proj/openrc.git;a=commit;h=9c4582fb
migrate-to-run: do not require a reboot
The script that migrates the @libexecdir <AT> /rc/init.d directory to
/run/openrc should not require a reboot.
Reported-by: chainsaw <AT> gentoo.org
---
sh/init.sh.Linux.in | 8 ++++++++
sh/migrate-to-run.sh.in | 37 +++++++++----------------------------
2 files changed, 17 insertions(+), 28 deletions(-)
diff --git a/sh/init.sh.Linux.in b/sh/init.sh.Linux.in
index 0eca736..f45eae1 100644
--- a/sh/init.sh.Linux.in
+++ b/sh/init.sh.Linux.in
@@ -51,6 +51,10 @@ if [ ! -d /run ]; then
fi
fi
+if [ -L /run/openrc ]; then
+ rm /run/openrc
+fi
+
if [ "$sys" = VSERVER ]; then
rm -rf /run/*
elif ! mountinfo -q /run; then
@@ -84,5 +88,9 @@ if [ -e "$RC_LIBEXECDIR"/cache/deptree ]; then
cp -p "$RC_LIBEXECDIR"/cache/* "$RC_SVCDIR" 2>/dev/null
fi
+if [ -e "$RC_LIBEXECDIR"/init.d ]; then
+ rm -rf "$RC_LIBEXECDIR"/init.d
+fi
+
echo sysinit >"$RC_SVCDIR"/softlevel
exit 0
diff --git a/sh/migrate-to-run.sh.in b/sh/migrate-to-run.sh.in
index 73978e7..b18c541 100644
--- a/sh/migrate-to-run.sh.in
+++ b/sh/migrate-to-run.sh.in
@@ -11,38 +11,19 @@ fi
if [ ! -d /run ]; then
eerror "/run is not a directory."
- eerror "This means the OpenRC dependency data cannot be migrated."
- eerror "Please create the /run directory and reboot the system."
- exit 1
+ eerror "moving /run to /run.pre-openrc"
+ mv /run /run.pre-openrc
+ mkdir /run
fi
-if ! mountinfo -q -f tmpfs /run; then
- for x in /run/.* /run/*; do
- case "$x" in
- /run/.|/run/..)
- continue
- ;;
- esac
- if [ -e "$x" ]; then
- eerror "Your /run directory contains files."
- eerror "Please reboot the system."
- exit 1
- fi
- done
+rm -rf /run/openrc
- mount -t tmpfs -o mode=0755,nosuid,nodev tmpfs /run 2> /dev/null
- if [ $? != 0 ]; then
- eerror "Unable to mount a tmpfs on /run."
- eerror "This means the OpenRC dependency data cannot be migrated."
- eerror "Please create the /run directory and reboot the system."
- exit 1
- fi
+if ! mountinfo -q -f tmpfs /run; then
+ ln -s "@LIBEXECDIR@"/init.d /run/openrc
+else
+ cp -a "@LIBEXECDIR@/init.d" /run/openrc
+ rc-update -u
fi
-rm -rf /run/openrc
-cp -a "@LIBEXECDIR@/init.d" /run/openrc
-rc-update -u
-umount "@LIBEXECDIR@/init.d"
-rm -rf "@LIBEXECDIR@/init.d"
einfo "The OpenRC dependency data was migrated successfully."
exit 0
^ permalink raw reply related [flat|nested] 8+ messages in thread
* [gentoo-commits] proj/openrc:openrc-0.11.x commit in: sh/
@ 2012-11-29 23:45 William Hubbs
0 siblings, 0 replies; 8+ messages in thread
From: William Hubbs @ 2012-11-29 23:45 UTC (permalink / raw
To: gentoo-commits
commit: 3f719bbb8ba8cb82ef3253b2415236b5ad93ed32
Author: William Hubbs <w.d.hubbs <AT> gmail <DOT> com>
AuthorDate: Mon Nov 26 03:27:36 2012 +0000
Commit: William Hubbs <williamh <AT> gentoo <DOT> org>
CommitDate: Thu Nov 29 23:42:50 2012 +0000
URL: http://git.overlays.gentoo.org/gitweb/?p=proj/openrc.git;a=commit;h=3f719bbb
migrate-to-run: Remove old RC_SVCDIR after unmounting tmpfs
reporrrrted-by: netfab <AT> gmail.com
X-Gentoo-Bug: 443996
X-Gentoo-Bug-URL: https://bugs.gentoo.org/show_bug.cgi?id=443996
---
sh/migrate-to-run.sh.in | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/sh/migrate-to-run.sh.in b/sh/migrate-to-run.sh.in
index aa31c62..6689f88 100644
--- a/sh/migrate-to-run.sh.in
+++ b/sh/migrate-to-run.sh.in
@@ -43,7 +43,7 @@ fi
rm -rf "@PREFIX@/run/openrc"
cp -a "@LIBEXECDIR@/init.d" "@PREFIX@/run/openrc"
rc-update -u
-rm -rf "@LIBEXECDIR@/init.d"
umount "@LIBEXECDIR@/init.d"
+rm -rf "@LIBEXECDIR@/init.d"
einfo "The OpenRC dependency data was migrated successfully."
exit 0
^ permalink raw reply related [flat|nested] 8+ messages in thread
* [gentoo-commits] proj/openrc:openrc-0.11.x commit in: sh/
@ 2012-11-10 21:14 William Hubbs
0 siblings, 0 replies; 8+ messages in thread
From: William Hubbs @ 2012-11-10 21:14 UTC (permalink / raw
To: gentoo-commits
commit: dd261a2a540730d2ad073a9d25c0c141a53d734e
Author: William Hubbs <w.d.hubbs <AT> gmail <DOT> com>
AuthorDate: Tue Nov 6 22:32:59 2012 +0000
Commit: William Hubbs <williamh <AT> gentoo <DOT> org>
CommitDate: Sat Nov 10 21:10:27 2012 +0000
URL: http://git.overlays.gentoo.org/gitweb/?p=proj/openrc.git;a=commit;h=dd261a2a
tmpfiles: fix bashism
reported-by: <pesa <AT> gentoo.org>
---
sh/tmpfiles.sh.in | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/sh/tmpfiles.sh.in b/sh/tmpfiles.sh.in
index a5041bb..ca0cbc3 100755
--- a/sh/tmpfiles.sh.in
+++ b/sh/tmpfiles.sh.in
@@ -232,7 +232,7 @@ if [ $(( CLEAN )) -eq 1 ] ; then
exit 1
fi
-if [ "$CREATE$REMOVE" == '00' ]; then
+if [ "$CREATE$REMOVE" = '00' ]; then
printf 'usage: %s [--create] [--remove] [--clean] [--verbose] [--dry-run]\n' "${0##*/}"
exit 1
fi
^ permalink raw reply related [flat|nested] 8+ messages in thread
* [gentoo-commits] proj/openrc:openrc-0.11.x commit in: sh/
@ 2012-11-05 21:36 William Hubbs
0 siblings, 0 replies; 8+ messages in thread
From: William Hubbs @ 2012-11-05 21:36 UTC (permalink / raw
To: gentoo-commits
commit: e473ab968c70edbbaa6e1ce2d7b8046400609304
Author: Robin H. Johnson <robbat2 <AT> gentoo <DOT> org>
AuthorDate: Mon Nov 5 21:25:32 2012 +0000
Commit: William Hubbs <williamh <AT> gentoo <DOT> org>
CommitDate: Mon Nov 5 21:36:10 2012 +0000
URL: http://git.overlays.gentoo.org/gitweb/?p=proj/openrc.git;a=commit;h=e473ab96
tmpfilesd: Doing both create+remove at the same time is valid.
Signed-off-by: Robin H. Johnson <robbat2 <AT> gentoo.org>
---
sh/tmpfiles.sh.in | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/sh/tmpfiles.sh.in b/sh/tmpfiles.sh.in
index ae7b7ca..a5041bb 100755
--- a/sh/tmpfiles.sh.in
+++ b/sh/tmpfiles.sh.in
@@ -232,7 +232,7 @@ if [ $(( CLEAN )) -eq 1 ] ; then
exit 1
fi
-if [ $(( CREATE + REMOVE )) -ne 1 ] ; then
+if [ "$CREATE$REMOVE" == '00' ]; then
printf 'usage: %s [--create] [--remove] [--clean] [--verbose] [--dry-run]\n' "${0##*/}"
exit 1
fi
^ permalink raw reply related [flat|nested] 8+ messages in thread
* [gentoo-commits] proj/openrc:openrc-0.11.x commit in: sh/
@ 2012-10-22 5:15 William Hubbs
0 siblings, 0 replies; 8+ messages in thread
From: William Hubbs @ 2012-10-22 5:15 UTC (permalink / raw
To: gentoo-commits
commit: 68f8e8aac289448a31881b81357ea9fb0e8ddde4
Author: Andrew Gregory <andrew.gregory.8 <AT> gmail <DOT> com>
AuthorDate: Thu Oct 11 18:34:19 2012 +0000
Commit: William Hubbs <williamh <AT> gentoo <DOT> org>
CommitDate: Mon Oct 22 03:37:39 2012 +0000
URL: http://git.overlays.gentoo.org/gitweb/?p=proj/openrc.git;a=commit;h=68f8e8aa
tmpfiles: return success from _f/_F on empty $arg
'[ -n "$arg" ] && _w' causes _f/_F to return the failure from the test when
$arg is empty. Inverting the test causes the test and _f/_F to return success.
Signed-off-by: Andrew Gregory <andrew.gregory.8 <AT> gmail.com>
---
sh/tmpfiles.sh.in | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/sh/tmpfiles.sh.in b/sh/tmpfiles.sh.in
index 2486da2..57cedbe 100755
--- a/sh/tmpfiles.sh.in
+++ b/sh/tmpfiles.sh.in
@@ -61,7 +61,7 @@ _f() {
if [ ! -e "$path" ]; then
dryrun_or_real install -m"$mode" -o"$uid" -g"$gid" /dev/null "$path"
- [ -n "$arg" ] && _w "$@"
+ [ -z "$arg" ] || _w "$@"
fi
}
@@ -72,7 +72,7 @@ _F() {
[ $CREATE -gt 0 ] || return 0
dryrun_or_real install -m"$mode" -o"$uid" -g"$gid" /dev/null "$path"
- [ -n "$arg" ] && _w "$@"
+ [ -z "$arg" ] || _w "$@"
}
_d() {
^ permalink raw reply related [flat|nested] 8+ messages in thread
* [gentoo-commits] proj/openrc:openrc-0.11.x commit in: sh/
@ 2012-10-21 19:53 William Hubbs
0 siblings, 0 replies; 8+ messages in thread
From: William Hubbs @ 2012-10-21 19:53 UTC (permalink / raw
To: gentoo-commits
commit: ee54bfef057284dc5684a18275fc491741732012
Author: William Hubbs <w.d.hubbs <AT> gmail <DOT> com>
AuthorDate: Sun Oct 21 19:45:45 2012 +0000
Commit: William Hubbs <williamh <AT> gentoo <DOT> org>
CommitDate: Sun Oct 21 19:52:37 2012 +0000
URL: http://git.overlays.gentoo.org/gitweb/?p=proj/openrc.git;a=commit;h=ee54bfef
tmpfiles: do not process systemd.conf
This file contains definitions specific to systemd, so we should not
process it.
Reported-by: <andrew.gregory.8 <AT> gmail.com>
---
sh/tmpfiles.sh.in | 1 +
1 files changed, 1 insertions(+), 0 deletions(-)
diff --git a/sh/tmpfiles.sh.in b/sh/tmpfiles.sh.in
index a341845..2486da2 100755
--- a/sh/tmpfiles.sh.in
+++ b/sh/tmpfiles.sh.in
@@ -201,6 +201,7 @@ tmpfiles_d=''
# `/run/tmpfiles/foo.conf' will always be read after `/etc/tmpfiles.d/bar.conf'
for d in ${tmpfiles_dirs} ; do
[ -d $d ] && for f in ${d}/*.conf ; do
+ [ "$f" = "$d/systemd.conf" ] && continue
[ -f $f ] && tmpfiles_basenames="${tmpfiles_basenames}\n${f##*/}"
done # for f in ${d}
done # for d in ${tmpfiles_dirs}
^ permalink raw reply related [flat|nested] 8+ messages in thread
end of thread, other threads:[~2012-12-07 16:16 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-10-22 5:15 [gentoo-commits] proj/openrc:openrc-0.11.x commit in: sh/ William Hubbs
-- strict thread matches above, loose matches on Subject: below --
2012-12-07 16:15 William Hubbs
2012-12-06 23:58 William Hubbs
2012-11-29 23:45 William Hubbs
2012-11-10 21:14 William Hubbs
2012-11-05 21:36 William Hubbs
2012-10-22 5:15 William Hubbs
2012-10-21 19:53 William Hubbs
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox