diff options
author | Renato Botelho <renato@netgate.com> | 2017-09-06 08:37:39 -0300 |
---|---|---|
committer | Renato Botelho <renato@netgate.com> | 2017-09-06 08:37:43 -0300 |
commit | d071acf5296f4f5a2d606c67ea94b1b5bd6e1dcb (patch) | |
tree | 286bcb3fc642100f27cf3f9821a9f2dadcd4ca40 /tools | |
parent | e9034b1530958303e8cfbb44e8b7133eedac003b (diff) | |
download | pfsense-d071acf5296f4f5a2d606c67ea94b1b5bd6e1dcb.zip pfsense-d071acf5296f4f5a2d606c67ea94b1b5bd6e1dcb.tar.gz |
Make sure pkg, pfSense, pfSense-base, pfSense-rc and kernel are set as vital
Diffstat (limited to 'tools')
-rw-r--r-- | tools/builder_common.sh | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/tools/builder_common.sh b/tools/builder_common.sh index 9646bc8..3bcb6d1 100644 --- a/tools/builder_common.sh +++ b/tools/builder_common.sh @@ -187,8 +187,8 @@ install_default_kernel() { print_error_pfS fi - # Lock kernel to avoid user end up removing it for any reason - pkg_chroot ${FINAL_CHROOT_DIR} lock -q -y $(get_pkg_name kernel-${KERNEL_NAME}) + # Set kernel pkg as vital to avoid user end up removing it for any reason + pkg_chroot ${FINAL_CHROOT_DIR} set -v 1 -y $(get_pkg_name kernel-${KERNEL_NAME}) if [ ! -f $FINAL_CHROOT_DIR/boot/kernel/kernel.gz ]; then echo ">>> ERROR: No kernel installed on $FINAL_CHROOT_DIR and the resulting image will be unusable. STOPPING!" | tee -a ${LOGFILE} @@ -697,6 +697,10 @@ customize_stagearea_for_image() { pkg_chroot_add ${FINAL_CHROOT_DIR} rc pkg_chroot_add ${FINAL_CHROOT_DIR} base + # Set base/rc pkgs as vital to avoid user end up removing it for any reason + pkg_chroot ${FINAL_CHROOT_DIR} set -v 1 -y $(get_pkg_name rc) + pkg_chroot ${FINAL_CHROOT_DIR} set -v 1 -y $(get_pkg_name base) + if [ "${_image_type}" = "iso" -o \ "${_image_type}" = "memstick" -o \ "${_image_type}" = "memstickserial" -o \ @@ -1164,6 +1168,8 @@ install_pkg_install_ports() { fi # Make sure required packages are set as non-automatic pkg_chroot ${STAGE_CHROOT_DIR} set -A 0 pkg ${MAIN_PKG} ${custom_package_list} + # pkg and MAIN_PKG are vital + pkg_chroot ${STAGE_CHROOT_DIR} set -y -v 1 pkg ${MAIN_PKG} # Remove unnecessary packages pkg_chroot ${STAGE_CHROOT_DIR} autoremove echo "Done!" |