aboutsummaryrefslogtreecommitdiffstats
path: root/net
diff options
context:
space:
mode:
authorwxs <wxs@FreeBSD.org>2009-04-23 00:28:18 +0800
committerwxs <wxs@FreeBSD.org>2009-04-23 00:28:18 +0800
commit60dfe05538c498cd5d8ad1dd7ffe4364eef4c20d (patch)
tree55410ce0758b523d2c7e80745de53ac38506ad62 /net
parent801dd7d3c36335b0fffd14377d565f66c53427db (diff)
downloadfreebsd-ports-gnome-60dfe05538c498cd5d8ad1dd7ffe4364eef4c20d.tar.gz
freebsd-ports-gnome-60dfe05538c498cd5d8ad1dd7ffe4364eef4c20d.tar.zst
freebsd-ports-gnome-60dfe05538c498cd5d8ad1dd7ffe4364eef4c20d.zip
- Remove trailing whitespace and add some error checking to pkg-install
PR: ports/133674 Submitted by: David Wood <david@wood2.org.uk> (maintainer)
Diffstat (limited to 'net')
-rw-r--r--net/freeradius2/files/pkg-install.in12
1 files changed, 10 insertions, 2 deletions
diff --git a/net/freeradius2/files/pkg-install.in b/net/freeradius2/files/pkg-install.in
index 1624fa2a8d4a..8b2e4a182fff 100644
--- a/net/freeradius2/files/pkg-install.in
+++ b/net/freeradius2/files/pkg-install.in
@@ -152,13 +152,21 @@ case $2 in
echo -n 's:^(libdir[[:space:]=]+)(.*[[:space:]:]+)?' ; \
echo -n $( echo ${radius_libdir} | \
sed -Ee 's:^(.*)-[[:digit:].]+$:\1:' ) ; \
- echo -n '(-[[:digit:].]+)?([[:space:]:]+.*)?$' ; \
+ echo -n '(-[[:digit:].]+)?([[:space:]:]+.*)?$' ; \
echo -n ':\1\2'${radius_libdir}'\4:' \
) ${radius_raddb}/radiusd.conf; then
echo "Failed to update libdir in ${radius_raddb}/radius.conf"
exit 1
fi
- rm ${radius_raddb}/radiusd.conf.update-libdir-original
+
+ if [ -f ${radius_raddb}/radiusd.conf.update-libdir-original ]; then
+ if ! rm ${radius_raddb}/radiusd.conf.update-libdir-original; then
+ echo -n 'Failed to delete backup file '
+ echo "${radius_raddb}/radiusd.conf.update-libdir-original."
+ exit 1
+ fi
+ fi
+
;;
esac