summaryrefslogtreecommitdiffstats
path: root/src/etc/rc.bootup
diff options
context:
space:
mode:
Diffstat (limited to 'src/etc/rc.bootup')
-rwxr-xr-xsrc/etc/rc.bootup32
1 files changed, 23 insertions, 9 deletions
diff --git a/src/etc/rc.bootup b/src/etc/rc.bootup
index e4a83f1..b7c3afb 100755
--- a/src/etc/rc.bootup
+++ b/src/etc/rc.bootup
@@ -132,6 +132,18 @@ if (file_exists("/root/firmware.tgz")) {
unlink("/root/firmware.tgz");
}
+/* Reinstall of packages after reboot has been requested */
+if (file_exists('/conf/needs_package_sync_after_reboot')) {
+ touch('/conf/needs_package_sync');
+ @unlink('/conf/needs_package_sync_after_reboot');
+}
+
+/* Triggering of the initial setup wizard after reboot has been requested */
+if (file_exists('/conf/trigger_initial_wizard_after_reboot')) {
+ touch('/conf/trigger_initial_wizard');
+ @unlink('/conf/trigger_initial_wizard_after_reboot');
+}
+
/* start devd (dhclient now uses it) */
echo "Starting device manager (devd)...";
mute_kernel_msgs();
@@ -152,6 +164,10 @@ echo "done.\n";
/* run any early shell commands specified in config.xml */
system_do_shell_commands(1);
+if (file_exists("/conf/trigger_initial_wizard")) {
+ check_for_alternate_interfaces();
+}
+
/*
* Determine if we need to throw a interface exception
* and ask the user to reassign interfaces. This will
@@ -393,16 +409,14 @@ if (file_exists("/sbin/shutdown.old")) {
}
/* Resync / Reinstall packages if need be */
-if (file_exists('/conf/needs_package_sync')) {
- if ($config['installedpackages'] <> '' && is_array($config['installedpackages']['package'])) {
- require_once("pkg-utils.inc");
- if ($g['platform'] == $g['product_name'] || $g['platform'] == "nanobsd") {
- mark_subsystem_dirty('packagelock');
- pkg_reinstall_all();
- clear_subsystem_dirty('packagelock');
- }
+if (file_exists('/conf/needs_package_sync') &&
+ ($g['platform'] == $g['product_name'] || $g['platform'] == "nanobsd")) {
+ require_once("pkg-utils.inc");
+ mark_subsystem_dirty('packagelock');
+ if (package_reinstall_all()) {
+ @unlink('/conf/needs_package_sync');
}
- @unlink('/conf/needs_package_sync');
+ clear_subsystem_dirty('packagelock');
}
/* Give syslogd a kick after everything else has been initialized, otherwise it can occasionally
OpenPOWER on IntegriCloud