From 239b75e388458d2b0e9dc8180318a694b3a090c818aad00e767b99569034e7fe Mon Sep 17 00:00:00 2001 From: Stephan Kulow Date: Fri, 3 May 2013 11:48:49 +0000 Subject: [PATCH] Accepting request 174398 from Base:System Otherwise, an empty folder will produce an error: > for l in /etc/rc.d/rc4.d/*; do echo $l; done /etc/rc.d/rc4.d/* > systemd-sysv-convert --save iscsid /usr/sbin/systemd-sysv-convert: line 44: [: too many arguments /usr/sbin/systemd-sysv-convert: line 47: [: too many arguments (resubmit of request 173801) (forwarded request 174108 from chkpnt) OBS-URL: https://build.opensuse.org/request/show/174398 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/systemd?expand=0&rev=137 --- systemd-mini.changes | 6 ++++++ systemd-sysv-convert | 2 +- systemd.changes | 6 ++++++ 3 files changed, 13 insertions(+), 1 deletion(-) diff --git a/systemd-mini.changes b/systemd-mini.changes index 6cc8c273..c804edbb 100644 --- a/systemd-mini.changes +++ b/systemd-mini.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Mon Apr 29 14:50:37 UTC 2013 - dschung@cs.uni-kl.de + +- Fix systemd-sysv-convert, so empty runlevel folders don't lead + to "line 44: [: too many arguments" + ------------------------------------------------------------------- Fri Apr 26 16:37:28 CEST 2013 - fcrozat@suse.com diff --git a/systemd-sysv-convert b/systemd-sysv-convert index ef38cbff..8ba3f211 100644 --- a/systemd-sysv-convert +++ b/systemd-sysv-convert @@ -39,7 +39,7 @@ declare -i priority service=$1 runlevel=$2 priority=-1 -for l in /etc/rc.d/rc$runlevel.d/* ; do +for l in $(ls /etc/rc.d/rc$runlevel.d/) ; do initscript=$(basename $l) if [ ${initscript:0:1} != "S" -o ${initscript:3} != "$service" ]; then continue diff --git a/systemd.changes b/systemd.changes index 6cc8c273..c804edbb 100644 --- a/systemd.changes +++ b/systemd.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Mon Apr 29 14:50:37 UTC 2013 - dschung@cs.uni-kl.de + +- Fix systemd-sysv-convert, so empty runlevel folders don't lead + to "line 44: [: too many arguments" + ------------------------------------------------------------------- Fri Apr 26 16:37:28 CEST 2013 - fcrozat@suse.com