diff options
author | John Polstra <jdp@FreeBSD.org> | 2004-08-05 23:37:47 +0000 |
---|---|---|
committer | John Polstra <jdp@FreeBSD.org> | 2004-08-05 23:37:47 +0000 |
commit | 7fc792b6a6e7c23e46b4d4b5a767475e44fcaaed (patch) | |
tree | d144f4eb317e97f3f95d749b0d2d44e576ca9ed5 /net/cvsup-mirror/files | |
parent | e9051fdc9c93db5fea5c0d5c8e45ab4e82b00f59 (diff) | |
download | ports-7fc792b6a6e7c23e46b4d4b5a767475e44fcaaed.tar.gz ports-7fc792b6a6e7c23e46b4d4b5a767475e44fcaaed.zip |
Fix two bugs in scripts.
1. If update.sh failed to determine the PREFIX, it didn't realize it
had failed. This is arguably caused by a shell bug in processing
the statement
export PREFIX=$(expr $0 : "\(/.*\)/etc/cvsup/update\.sh\$")
This statement always succeeds even if the "expr" command fails.
Moving the "export" to a separate statement makes it work.
2. If the system had no "/home" directory, the pkg-install script
would create it with mode 0700, making ~cvsupin inaccessible to its
owner. A user ran into this bug when installing cvsup-mirror into a
jail.
Notes
Notes:
svn path=/head/; revision=115484
Diffstat (limited to 'net/cvsup-mirror/files')
-rw-r--r-- | net/cvsup-mirror/files/update.sh | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/net/cvsup-mirror/files/update.sh b/net/cvsup-mirror/files/update.sh index 025900a31306..d67e9252a7d1 100644 --- a/net/cvsup-mirror/files/update.sh +++ b/net/cvsup-mirror/files/update.sh @@ -1,10 +1,11 @@ #! /bin/sh -if ! export PREFIX=$(expr $0 : "\(/.*\)/etc/cvsup/update\.sh\$"); then +if ! PREFIX=$(expr $0 : "\(/.*\)/etc/cvsup/update\.sh\$"); then echo "$0: Cannot determine the PREFIX" >&2 exit 1 fi +export PREFIX export CVSUP_ARGS="$*" export PATH=/bin:/usr/bin:${PREFIX}/bin |