Accepting request 260523 from home:Ledest:misc
fix bashisms in pre script OBS-URL: https://build.opensuse.org/request/show/260523 OBS-URL: https://build.opensuse.org/package/show/network:utilities/nbd?expand=0&rev=25
This commit is contained in:
parent
e613a2a5da
commit
b152c83e84
@ -1,3 +1,8 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Sun Nov 09 19:27:00 UTC 2014 - Led <ledest@gmail.com>
|
||||||
|
|
||||||
|
- fix bashisms in pre script
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Thu Apr 18 19:38:29 UTC 2013 - dmueller@suse.com
|
Thu Apr 18 19:38:29 UTC 2013 - dmueller@suse.com
|
||||||
|
|
||||||
|
12
nbd.spec
12
nbd.spec
@ -1,7 +1,7 @@
|
|||||||
#
|
#
|
||||||
# spec file for package nbd
|
# 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
|
# All modifications and additions to the file contributed by third parties
|
||||||
# remain the property of their copyright owners, unless otherwise agreed
|
# 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?
|
# Do we have to create a generic section?
|
||||||
unset generic
|
unset generic
|
||||||
if test -e /etc/nbd-server/config; then generic=1; fi
|
if test -e /etc/nbd-server/config; then generic=1; fi
|
||||||
|
grep -vE '^(#|[[:blank:]]*$)' /etc/nbd-server.conf |
|
||||||
while read port file opts; do
|
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
|
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
|
generic=1
|
||||||
fi
|
fi
|
||||||
FN=${file%/*}
|
FN=${file%/*}
|
||||||
nm="cvt.$port.${FN##*/}.${file##*/}"
|
nm="cvt.$port.${FN##*/}.${file##*/}"
|
||||||
echo " ... convert $port $file $opts -> $nm"
|
echo " ... convert $port $file $opts -> $nm"
|
||||||
/usr/bin/nbd-server $port $file $opts -o "$nm" >> /etc/nbd-server/config
|
/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
|
mv /etc/nbd-server.conf /etc/nbd-server.conf.converted
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user