[Pkg-privacy-commits] [flashproxy] 21/65: - quote variables in shell scripts
Ximin Luo
infinity0 at moszumanska.debian.org
Fri Aug 21 13:49:41 UTC 2015
This is an automated email from the git hooks/post-receive script.
infinity0 pushed a commit to branch _volatile-rc
in repository flashproxy.
commit 2cbf740540be4f2c0c2d66037022e41bdb21ae52
Author: Ximin Luo <infinity0 at pwned.gg>
Date: Sun May 18 14:46:35 2014 +0100
- quote variables in shell scripts
---
debian/flashproxy-facilitator.postinst | 16 ++++++++--------
debian/flashproxy-facilitator.postrm | 6 +++---
2 files changed, 11 insertions(+), 11 deletions(-)
diff --git a/debian/flashproxy-facilitator.postinst b/debian/flashproxy-facilitator.postinst
index f0a8878..0bc9d2a 100644
--- a/debian/flashproxy-facilitator.postinst
+++ b/debian/flashproxy-facilitator.postinst
@@ -25,22 +25,22 @@ hadrnd=$(test -e /root/.rnd && echo true || echo false)
case "$1" in
configure)
# install user
- id -u ${fpfacilitatoruser} >/dev/null 2>&1 || { \
+ id -u "${fpfacilitatoruser}" >/dev/null 2>&1 || { \
which adduser >/dev/null 2>&1 && \
adduser --quiet \
--system \
--group \
--disabled-password \
- --home ${pkgconfdir} \
+ --home "${pkgconfdir}" \
--no-create-home \
--shell /bin/false \
- ${fpfacilitatoruser} ; }
+ "${fpfacilitatoruser}" ; }
# install secrets
- test -f ${pkgconfdir}/reg-daemon.key || { \
- install -m 600 /dev/null ${pkgconfdir}/reg-daemon.key && \
- openssl genrsa 2048 | tee ${pkgconfdir}/reg-daemon.key | \
- openssl rsa -pubout > ${pkgconfdir}/reg-daemon.pub; }
- if ! $hadrnd; then rm /root/.rnd; fi
+ test -f "${pkgconfdir}/reg-daemon.key" || { \
+ install -m 600 /dev/null "${pkgconfdir}"/reg-daemon.key && \
+ openssl genrsa 2048 | tee "${pkgconfdir}"/reg-daemon.key | \
+ openssl rsa -pubout > "${pkgconfdir}"/reg-daemon.pub; }
+ if ! "$hadrnd"; then rm /root/.rnd; fi
;;
abort-upgrade|abort-remove|abort-deconfigure)
diff --git a/debian/flashproxy-facilitator.postrm b/debian/flashproxy-facilitator.postrm
index 22b3c0c..d246368 100644
--- a/debian/flashproxy-facilitator.postrm
+++ b/debian/flashproxy-facilitator.postrm
@@ -25,12 +25,12 @@ case "$1" in
if [ "$1" = "purge" ]; then
# remove secrets
for i in reg-daemon.key reg-daemon.pub reg-email.pass; do \
- rm -f ${pkgconfdir}/$i; \
+ rm -f "${pkgconfdir}/$i"; \
done
# remove daemon data e.g. logs
for name in facilitator facilitator-reg-daemon facilitator-email-poller; do
- rm -f /var/log/${name}.log*
- rm -f /var/run/${name}.pid
+ rm -f "/var/log/${name}".log*
+ rm -f "/var/run/${name}".pid
done
fi
;;
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-privacy/packages/flashproxy.git
More information about the Pkg-privacy-commits
mailing list