diff --git a/nbd.changes b/nbd.changes index f127a27..7efe5e0 100644 --- a/nbd.changes +++ b/nbd.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Sun Nov 09 19:27:00 UTC 2014 - Led + +- fix bashisms in pre script + ------------------------------------------------------------------- Thu Apr 18 19:38:29 UTC 2013 - dmueller@suse.com diff --git a/nbd.spec b/nbd.spec index 92a3bd8..fc1d639 100644 --- a/nbd.spec +++ b/nbd.spec @@ -1,7 +1,7 @@ # # spec file for package nbd # -# Copyright (c) 2013 SUSE LINUX Products GmbH, Nuernberg, Germany. +# Copyright (c) 2014 SUSE LINUX Products GmbH, Nuernberg, Germany. # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -143,18 +143,20 @@ if test -e /etc/nbd-server.conf; then # Do we have to create a generic section? unset generic if test -e /etc/nbd-server/config; then generic=1; fi + grep -vE '^(#|[[:blank:]]*$)' /etc/nbd-server.conf | while read port file opts; do - if test -z "$port"; then continue; fi - if test "${port:0:1}" = "#"; then continue; fi if test -z "$generic"; then - echo -e "[generic]\n\t# No generic options yet\n" > /etc/nbd-server/config + echo > /etc/nbd-server/config + echo "[generic]" >> /etc/nbd-server/config + echo " # No generic options yet" >> /etc/nbd-server/config + echo >> /etc/nbd-server/config generic=1 fi FN=${file%/*} nm="cvt.$port.${FN##*/}.${file##*/}" echo " ... convert $port $file $opts -> $nm" /usr/bin/nbd-server $port $file $opts -o "$nm" >> /etc/nbd-server/config - done < /etc/nbd-server.conf + done mv /etc/nbd-server.conf /etc/nbd-server.conf.converted fi