summaryrefslogtreecommitdiffstats
path: root/tools/builder_common.sh
diff options
context:
space:
mode:
authorRenato Botelho <renato@netgate.com>2017-09-06 08:37:39 -0300
committerRenato Botelho <renato@netgate.com>2017-09-06 08:37:39 -0300
commitfdcec2366b3331060dfc2c49a1db4ddbbdeec1af (patch)
tree4e4755a9bf36a827b589370e9268c3b41e1ac1a1 /tools/builder_common.sh
parent617bb8010972e758a8a7cf392076eda92eea43a1 (diff)
downloadpfsense-fdcec2366b3331060dfc2c49a1db4ddbbdeec1af.zip
pfsense-fdcec2366b3331060dfc2c49a1db4ddbbdeec1af.tar.gz
Make sure pkg, pfSense, pfSense-base, pfSense-rc and kernel are set as vital
Diffstat (limited to 'tools/builder_common.sh')
-rw-r--r--tools/builder_common.sh10
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!"
OpenPOWER on IntegriCloud