[sheepdog] [PATCH stable-0.9 2/4] deb: escape forward slashes in DAEMON_ARGS
Hitoshi Mitake
mitake.hitoshi at lab.ntt.co.jp
Wed Mar 25 15:59:34 CET 2015
From: Alexander Guy <alexander at andern.org>
This allows arguments that take things like paths
(e.g. -l dir=/somewhere) to be handled properly.
Signed-off-by: Alexander Guy <alexander at andern.org>
Signed-off-by: Hitoshi Mitake <mitake.hitoshi at lab.ntt.co.jp>
---
debian/sheepdog.postinst | 1 +
1 file changed, 1 insertion(+)
diff --git a/debian/sheepdog.postinst b/debian/sheepdog.postinst
index bc72f06..760ee67 100644
--- a/debian/sheepdog.postinst
+++ b/debian/sheepdog.postinst
@@ -19,6 +19,7 @@ if [ "$1" = "configure" ] ; then
sed -i -e "s/^[ \t]*START=.*/START=\"$SERVICE_START\"/g" /etc/default/sheepdog
db_get sheepdog/daemon_args
+ RET="$(echo $RET | sed -e 's:/:\\/:g')"
sed -i -e "s/^[ \t]*DAEMON_ARGS=.*/DAEMON_ARGS=\"$RET\"/g" /etc/default/sheepdog
fi
db_stop || true
--
1.9.1
More information about the sheepdog
mailing list