pkgsrc-WIP-changes archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
wip/gnunet: rc.d script: wrap PATH export in case.
Module Name: pkgsrc-wip
Committed By: ng0 <ng0%NetBSD.org@localhost>
Pushed By: ng0
Date: Tue Oct 29 23:37:28 2019 +0000
Changeset: cf92c5c93b6d9ebe076e6ad84c42843ddb51dbbf
Modified Files:
gnunet/files/gnunet.in
Log Message:
wip/gnunet: rc.d script: wrap PATH export in case.
To see a diff of this commit:
https://wip.pkgsrc.org/cgi-bin/gitweb.cgi?p=pkgsrc-wip.git;a=commitdiff;h=cf92c5c93b6d9ebe076e6ad84c42843ddb51dbbf
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
diffstat:
gnunet/files/gnunet.in | 11 ++++++++++-
1 file changed, 10 insertions(+), 1 deletion(-)
diffs:
diff --git a/gnunet/files/gnunet.in b/gnunet/files/gnunet.in
index a5e8765039..a73d083d7a 100755
--- a/gnunet/files/gnunet.in
+++ b/gnunet/files/gnunet.in
@@ -33,7 +33,16 @@ start_precmd="gnunet_precmd"
# XXX: We need to export PATH with appended /usr/pkg/{sbin,bin} to get
# the upnpc binary and others.
# We can not use export here.
-export PATH=${PATH}:@PREFIX@/bin:@PREFIX@/sbin
+check_path="@SU@ -m ${gnunet_user} -c '${PATH}'"
+case "$check_path" in
+ *@PREFIX@/bin*|*@PREFIX@/sbin*)
+ ;;
+ *)
+ PATH=${PATH}:@PREFIX@/bin:@PREFIX@/sbin
+ # echo $PATH
+ ;;
+esac
+
gnunet_env="PATH=${PATH} HOME=${gnunet_home} USER=${gnunet_user} TMP=/tmp GNUNET_PREFIX=@PREFIX@ GNUNET_CACHE_HOME=${gnunet_home}/cache"
check_pidfile()
Home |
Main Index |
Thread Index |
Old Index