summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorerdgeist <erdgeist@erdgeist.org>2006-04-24 10:45:46 +0000
committererdgeist <erdgeist@erdgeist.org>2006-04-24 10:45:46 +0000
commit6ee8b2a5b691673cf87f600c8ae66cfaaadfba64 (patch)
tree62145885739831d0c1c2ca24f13cccd8f332e2e5
parent72fd60f0a112086a1190755aed7554de28ab58b8 (diff)
ezjail_dirlist has been created. This variable will serve as starting point for automatic extension of that list, e.g. /usr/lib32 on 64bit machines.
-rwxr-xr-xezjail-admin6
1 files changed, 4 insertions, 2 deletions
diff --git a/ezjail-admin b/ezjail-admin
index 75258e8..7132271 100755
--- a/ezjail-admin
+++ b/ezjail-admin
@@ -26,6 +26,8 @@ ezjail_devfs_ruleset=${ezjail_devfs_ruleset:-"devfsrules_jail"}
26ezjail_procfs_enable=${ezjail_procfs_enable:-"YES"} 26ezjail_procfs_enable=${ezjail_procfs_enable:-"YES"}
27ezjail_fdescfs_enable=${ezjail_fdescfs_enable:-"YES"} 27ezjail_fdescfs_enable=${ezjail_fdescfs_enable:-"YES"}
28 28
29ezjail_dirlist="bin boot lib libexec rescue sbin usr/bin usr/games usr/include usr/lib usr/libdata usr/libexec usr/sbin usr/src usr/share"
30
29# define our bail out shortcut 31# define our bail out shortcut
30exerr () { echo -e "$*"; exit 1; } 32exerr () { echo -e "$*"; exit 1; }
31 33
@@ -364,7 +366,7 @@ setup|update)
364 # This mkdir is important, since cpio will create intermediate 366 # This mkdir is important, since cpio will create intermediate
365 # directories with permission 0700 which is bad 367 # directories with permission 0700 which is bad
366 mkdir -p ${ezjail_jailbase}/usr 368 mkdir -p ${ezjail_jailbase}/usr
367 for dir in bin boot lib libexec rescue sbin usr/bin usr/games usr/include usr/lib usr/libdata usr/libexec usr/sbin usr/src usr/share; do 369 for dir in ${ezjail_dirlist}; do
368 find ${dir} | cpio -d -p -v ${ezjail_jailbase} || exerr "Installation of ${dir} failed." 370 find ${dir} | cpio -d -p -v ${ezjail_jailbase} || exerr "Installation of ${dir} failed."
369 chflags -R noschg ${dir}; rm -r ${dir}; ln -s /basejail/${dir} ${dir} 371 chflags -R noschg ${dir}; rm -r ${dir}; ln -s /basejail/${dir} ${dir}
370 done 372 done
@@ -494,7 +496,7 @@ install)
494 # This mkdir is important, since cpio will create intermediate 496 # This mkdir is important, since cpio will create intermediate
495 # directories with permission 0700 which is bad 497 # directories with permission 0700 which is bad
496 mkdir -p ${ezjail_jailbase}/usr 498 mkdir -p ${ezjail_jailbase}/usr
497 for dir in bin boot lib libexec rescue sbin usr/bin usr/games usr/include usr/lib usr/libdata usr/libexec usr/sbin usr/src usr/share; do 499 for dir in ${ezjail_dirlist}; do
498 find ${dir} | cpio -d -p -v ${ezjail_jailbase} || exerr "Installation of ${dir} failed." 500 find ${dir} | cpio -d -p -v ${ezjail_jailbase} || exerr "Installation of ${dir} failed."
499 chflags -R noschg ${dir}; rm -r ${dir}; ln -s /basejail/${dir} ${dir} 501 chflags -R noschg ${dir}; rm -r ${dir}; ln -s /basejail/${dir} ${dir}
500 done 502 done