Don't create or modify etc/fstab and etc/crontab on empty jail creation

This commit is contained in:
Jose
2020-10-15 13:18:55 -04:00
parent 5e9e58dd92
commit ace6c9ab29

View File

@@ -386,8 +386,10 @@ create_jail() {
# Creates a dummy fstab file
# Disables adjkerntz, avoids spurious error messages
# Set strict permissions on the jail by default
if [ -z "${EMPTY_JAIL}" ]; then
touch "etc/fstab"
sed -i '' 's|[0-9],[0-9]\{2\}.*[0-9]-[0-9].*root.*kerntz -a|#& # Disabled by bastille|' "etc/crontab"
fi
chmod 0700 "${bastille_jailsdir}/${NAME}"
}