diff options
-rw-r--r-- | src/etc/inc/config.lib.inc | 4 | ||||
-rw-r--r-- | src/etc/inc/system.inc | 1 | ||||
-rwxr-xr-x | src/etc/rc.initial.defaults | 1 |
3 files changed, 6 insertions, 0 deletions
diff --git a/src/etc/inc/config.lib.inc b/src/etc/inc/config.lib.inc index 41bc2af..d61cf17 100644 --- a/src/etc/inc/config.lib.inc +++ b/src/etc/inc/config.lib.inc @@ -624,6 +624,10 @@ function write_config($desc="Unknown", $backup = true, $write_config_only = fals function reset_factory_defaults($lock = false, $reboot_required = true) { global $g; + /* Remove all additional packages */ + + mwexec("/bin/sh /usr/local/sbin/{$g['product_name']}-upgrade -r ALL_PACKAGES"); + conf_mount_rw(); if (!$lock) { $lockkey = lock('config', LOCK_EX); diff --git a/src/etc/inc/system.inc b/src/etc/inc/system.inc index 4806407..74ff903 100644 --- a/src/etc/inc/system.inc +++ b/src/etc/inc/system.inc @@ -2090,6 +2090,7 @@ function system_check_reset_button() { *********************************************************************** * Reset button pressed - resetting configuration to factory defaults. * +* All additional packages installed will be removed * * The system will reboot after this completes. * *********************************************************************** diff --git a/src/etc/rc.initial.defaults b/src/etc/rc.initial.defaults index c80a18d..3020cc2 100755 --- a/src/etc/rc.initial.defaults +++ b/src/etc/rc.initial.defaults @@ -38,6 +38,7 @@ echo "\n" . gettext("You are about to reset the firewall to factory defaults."); echo "\n" . gettext("The firewall will reboot after resetting the configuration."); + echo "\n" . gettext("All additional packages installed will be removed."); echo "\n" . gettext("Do you want to proceed [y|n]?") . " "; if (strcasecmp(chop(fgets($fp)), "y") == 0) { |