diff options
author | Scott Ullrich <sullrich@pfsense.org> | 2011-01-05 16:44:30 -0500 |
---|---|---|
committer | Scott Ullrich <sullrich@pfsense.org> | 2011-01-05 16:44:30 -0500 |
commit | 9b1936193f0adfda87b060a5fb19270232f169a5 (patch) | |
tree | 878b3f1dfc93ab0a1524a0fe53eb53d96255482f /etc/rc.bootup | |
parent | fe868e1d9d6fafc323356ab3422a00d415756e6b (diff) | |
download | pfsense-9b1936193f0adfda87b060a5fb19270232f169a5.zip pfsense-9b1936193f0adfda87b060a5fb19270232f169a5.tar.gz |
Reinstall packages on bootup during console. Ticket #1156
Diffstat (limited to 'etc/rc.bootup')
-rwxr-xr-x | etc/rc.bootup | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/etc/rc.bootup b/etc/rc.bootup index fe1faa3..047f4ef 100755 --- a/etc/rc.bootup +++ b/etc/rc.bootup @@ -381,6 +381,16 @@ activate_powerd(); if (file_exists("/sbin/shutdown.old")) @unlink("/sbin/shutdown.old"); +/* Resync / Reinstall packages if need be */ +if(file_exists('/conf/needs_package_sync')) { + if($config['installedpackages'] <> '' && is_array($config['installedpackages']['package'])) { + if($g['platform'] == "pfSense" || $g['platform'] == "nanobsd") { + pkg_reinstall_all(); + unlink('/conf/needs_package_sync'); + } + } +} + /* done */ unset($g['booting']); @@ -388,4 +398,4 @@ led_normalize(); conf_mount_ro(); -?> +?>
\ No newline at end of file |