mirror of
https://codeberg.org/scip/jaildk.git
synced 2025-12-18 05:01:02 +01:00
implement #20: added -s parameter to base command to instal scripts
This commit is contained in:
@@ -143,7 +143,7 @@ For an overview of the provided commands, here's the usage screen:
|
|||||||
Usage: ./jaildk <command> <command-args>
|
Usage: ./jaildk <command> <command-args>
|
||||||
|
|
||||||
Building Jails:
|
Building Jails:
|
||||||
base -b <name> [-w] - build a new base
|
base -b <name> [-w] [-s <script>] - build a new base
|
||||||
build <jail> -m <mode> [-b <base>] [-v <version>] - install a build chroot of a jail
|
build <jail> -m <mode> [-b <base>] [-v <version>] - install a build chroot of a jail
|
||||||
create - create a new jail from a template
|
create - create a new jail from a template
|
||||||
clone -s <src> -d <dst> [-o <v>] [-n <v>] - clone an existing jail or jail version
|
clone -s <src> -d <dst> [-o <v>] [-n <v>] - clone an existing jail or jail version
|
||||||
|
|||||||
@@ -831,6 +831,8 @@ Build a base directory from bsd install media. Options:
|
|||||||
build stuff. Use this if you want to use the ports
|
build stuff. Use this if you want to use the ports
|
||||||
collection.
|
collection.
|
||||||
-f force mode, remove any old dist files.
|
-f force mode, remove any old dist files.
|
||||||
|
-s <script> install additional scripts to /usr/bin, separate multiple
|
||||||
|
scripts with whitespace.
|
||||||
"
|
"
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -840,11 +842,13 @@ jaildk_base() {
|
|||||||
base=""
|
base=""
|
||||||
force=""
|
force=""
|
||||||
rw=""
|
rw=""
|
||||||
|
scripts=""
|
||||||
|
|
||||||
OPTIND=1; while getopts "b:wf" arg; do
|
OPTIND=1; while getopts "b:wfs:" arg; do
|
||||||
case $arg in
|
case $arg in
|
||||||
w) rw=1;;
|
w) rw=1;;
|
||||||
b) base=${OPTARG};;
|
b) base=${OPTARG};;
|
||||||
|
s) scripts="${OPTARG}";;
|
||||||
f) force=1;;
|
f) force=1;;
|
||||||
*) usage_base;;
|
*) usage_base;;
|
||||||
esac
|
esac
|
||||||
@@ -927,7 +931,8 @@ var/tmp"
|
|||||||
if test -d "$basedir"; then
|
if test -d "$basedir"; then
|
||||||
echo "base $basedir already exist!"
|
echo "base $basedir already exist!"
|
||||||
exit 1
|
exit 1
|
||||||
else
|
fi
|
||||||
|
|
||||||
ex mkdir -p $basedir
|
ex mkdir -p $basedir
|
||||||
|
|
||||||
if test -e /usr/freebsd-dist/MANIFEST; then
|
if test -e /usr/freebsd-dist/MANIFEST; then
|
||||||
@@ -972,6 +977,11 @@ var/tmp"
|
|||||||
ex ln -s /tmp $basedir/var/cache
|
ex ln -s /tmp $basedir/var/cache
|
||||||
ex ln -s /tmp $basedir/var/run
|
ex ln -s /tmp $basedir/var/run
|
||||||
|
|
||||||
|
# any scripts?
|
||||||
|
for script in $scripts; do
|
||||||
|
ex install -m 755 $script -o root -g wheel $basedir/usr/bin/$script
|
||||||
|
done
|
||||||
|
|
||||||
if test -n "$rw"; then
|
if test -n "$rw"; then
|
||||||
echo "You have choosen to create a build base with ports support"
|
echo "You have choosen to create a build base with ports support"
|
||||||
echo -n "Want to fetch the ports collection now [Yn]? "
|
echo -n "Want to fetch the ports collection now [Yn]? "
|
||||||
@@ -982,7 +992,6 @@ var/tmp"
|
|||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
fi
|
fi
|
||||||
fi
|
|
||||||
}
|
}
|
||||||
|
|
||||||
clone() {
|
clone() {
|
||||||
|
|||||||
Reference in New Issue
Block a user