mirror of
https://github.com/hackacad/bastille.git
synced 2025-12-23 10:40:43 +01:00
Extra validation on Linux Jails, revert cp.sh to avoid issues with templates
This commit is contained in:
@@ -66,7 +66,7 @@ esac
|
|||||||
for _jail in ${JAILS}; do
|
for _jail in ${JAILS}; do
|
||||||
info "[${_jail}]:"
|
info "[${_jail}]:"
|
||||||
bastille_jail_path="${bastille_jailsdir}/${_jail}/root"
|
bastille_jail_path="${bastille_jailsdir}/${_jail}/root"
|
||||||
cp "${OPTION}" "${CPSOURCE}" "${bastille_jail_path}${CPDEST}"
|
cp "${OPTION}" "${CPSOURCE}" "${bastille_jail_path}/${CPDEST}"
|
||||||
RETURN="$?"
|
RETURN="$?"
|
||||||
if [ "${TARGET}" = "ALL" ]; then
|
if [ "${TARGET}" = "ALL" ]; then
|
||||||
# Display the return status for reference
|
# Display the return status for reference
|
||||||
|
|||||||
@@ -113,6 +113,13 @@ validate_netconf() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
validate_release() {
|
validate_release() {
|
||||||
|
## ensure the user set the Linux(experimental) option explicitly
|
||||||
|
if [ -n "${UBUNTU}" ]; then
|
||||||
|
if [ -z "${LINUX_JAIL}" ]; then
|
||||||
|
usage
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
## check release name match, else show usage
|
## check release name match, else show usage
|
||||||
if [ -n "${NAME_VERIFY}" ]; then
|
if [ -n "${NAME_VERIFY}" ]; then
|
||||||
RELEASE="${NAME_VERIFY}"
|
RELEASE="${NAME_VERIFY}"
|
||||||
@@ -644,10 +651,12 @@ if [ -z "${EMPTY_JAIL}" ]; then
|
|||||||
validate_release
|
validate_release
|
||||||
;;
|
;;
|
||||||
ubuntu_bionic|bionic|ubuntu-bionic)
|
ubuntu_bionic|bionic|ubuntu-bionic)
|
||||||
|
UBUNTU="1"
|
||||||
NAME_VERIFY=Ubuntu_1804
|
NAME_VERIFY=Ubuntu_1804
|
||||||
validate_release
|
validate_release
|
||||||
;;
|
;;
|
||||||
ubuntu_focal|focal|ubuntu-focal)
|
ubuntu_focal|focal|ubuntu-focal)
|
||||||
|
UBUNTU="1"
|
||||||
NAME_VERIFY=Ubuntu_2004
|
NAME_VERIFY=Ubuntu_2004
|
||||||
validate_release
|
validate_release
|
||||||
;;
|
;;
|
||||||
|
|||||||
Reference in New Issue
Block a user