mirror of
https://github.com/hackacad/bastille.git
synced 2025-12-21 09:41:47 +01:00
Properly check for home dir and symlink
This commit is contained in:
@@ -207,10 +207,6 @@ create_jail() {
|
|||||||
mkdir -p "${bastille_jail_base}"
|
mkdir -p "${bastille_jail_base}"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ ! -d "${bastille_jail_path}/usr/home" ]; then
|
|
||||||
mkdir -p "${bastille_jail_path}/usr/home"
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ ! -d "${bastille_jail_path}/usr/local" ]; then
|
if [ ! -d "${bastille_jail_path}/usr/local" ]; then
|
||||||
mkdir -p "${bastille_jail_path}/usr/local"
|
mkdir -p "${bastille_jail_path}/usr/local"
|
||||||
fi
|
fi
|
||||||
@@ -259,14 +255,12 @@ create_jail() {
|
|||||||
echo
|
echo
|
||||||
|
|
||||||
if [ -z "${THICK_JAIL}" ]; then
|
if [ -z "${THICK_JAIL}" ]; then
|
||||||
for _link in bin boot lib libexec rescue sbin usr/bin usr/include usr/lib usr/lib32 usr/libdata usr/libexec usr/sbin usr/share usr/src; do
|
LINK_LIST="bin boot lib libexec rescue sbin usr/bin usr/include usr/lib usr/lib32 usr/libdata usr/libexec usr/sbin usr/share usr/src"
|
||||||
|
for _link in ${LINK_LIST}; do
|
||||||
ln -sf /.bastille/${_link} ${_link}
|
ln -sf /.bastille/${_link} ${_link}
|
||||||
done
|
done
|
||||||
fi
|
fi
|
||||||
|
|
||||||
## link home properly
|
|
||||||
ln -s usr/home home
|
|
||||||
|
|
||||||
if [ -z "${THICK_JAIL}" ]; then
|
if [ -z "${THICK_JAIL}" ]; then
|
||||||
## rw
|
## rw
|
||||||
## copy only required files for thin jails
|
## copy only required files for thin jails
|
||||||
@@ -324,6 +318,15 @@ create_jail() {
|
|||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
## create home directory if missing
|
||||||
|
if [ ! -d "${bastille_jail_path}/usr/home" ]; then
|
||||||
|
mkdir -p "${bastille_jail_path}/usr/home"
|
||||||
|
fi
|
||||||
|
## link home properly
|
||||||
|
if [ ! -L "home" ]; then
|
||||||
|
ln -s usr/home home
|
||||||
|
fi
|
||||||
|
|
||||||
## rc.conf
|
## rc.conf
|
||||||
## + syslogd_flags="-ss"
|
## + syslogd_flags="-ss"
|
||||||
## + sendmail_enable="NO"
|
## + sendmail_enable="NO"
|
||||||
|
|||||||
Reference in New Issue
Block a user