comparison sbin/ftjail @ 550:847ae246f3cc

Make the port really DATADIR and EXAMPLESDIR safe because the user may redefine DATADIR and EXAMPLESDIR. pkg-plist must use DATADIR and EXAMPLESDIR. The scripts must search for common.subr and farray.sh more intelligently.
author Franz Glasner <fzglas.hg@dom66.de>
date Tue, 10 Sep 2024 21:10:27 +0200
parents 566ecdd9e73b
children 2fda9ab57359
comparison
equal deleted inserted replaced
549:48b31d24d71d 550:847ae246f3cc
13 #: :ID: @(#)@@SIMPLEVERSIONTAG@@ 13 #: :ID: @(#)@@SIMPLEVERSIONTAG@@
14 #: 14 #:
15 15
16 set -eu 16 set -eu
17 17
18 VERSION="@@VERSION@@" 18 VERSION='@@VERSION@@'
19 19
20 USAGE=' 20 USAGE='
21 USAGE: ftjail [ OPTIONS ] COMMAND [ COMMAND OPTIONS ] [ ARG ... ] 21 USAGE: ftjail [ OPTIONS ] COMMAND [ COMMAND OPTIONS ] [ ARG ... ]
22 22
23 OPTIONS: 23 OPTIONS:
55 All commands with the exception of "populate-tmpl" require ZFS as 55 All commands with the exception of "populate-tmpl" require ZFS as
56 filesystem. 56 filesystem.
57 ' 57 '
58 58
59 59
60 _p_datadir="$(dirname "$0")"/../share/local-bsdtools 60 _p_datadir='@@DATADIR@@'
61 [ "${_p_datadir#@@DATADIR}" = '@@' ] && _p_datadir="$(dirname "$0")"/../share/local-bsdtools
61 . "${_p_datadir}/common.subr" 62 . "${_p_datadir}/common.subr"
62 63
63 64
64 # Reset to standard umask 65 # Reset to standard umask
65 umask 0022 66 umask 0022