From: <abe...@us...> - 2015-12-04 21:56:05
|
Revision: 7368 http://sourceforge.net/p/astlinux/code/7368 Author: abelbeck Date: 2015-12-04 21:56:02 +0000 (Fri, 04 Dec 2015) Log Message: ----------- kernel-reboot, ignore terminating signals and add automatic support to the web interface Modified Paths: -------------- branches/1.0/package/webinterface/altweb/common/functions.php branches/1.0/project/astlinux/target_skeleton/sbin/kernel-reboot Modified: branches/1.0/package/webinterface/altweb/common/functions.php =================================================================== --- branches/1.0/package/webinterface/altweb/common/functions.php 2015-12-04 17:25:25 UTC (rev 7367) +++ branches/1.0/package/webinterface/altweb/common/functions.php 2015-12-04 21:56:02 UTC (rev 7368) @@ -168,7 +168,7 @@ function systemREBOOT($myself, $result, $setup = FALSE) { global $global_prefs; - $count_down_secs = 150; + $count_down_secs = 120; if (($adjust = getPREFdef($global_prefs, 'system_reboot_timer_adjust')) !== '') { $count_down_secs += (int)$adjust; @@ -178,8 +178,14 @@ if ($arch === 'net4801' || $arch === 'wrap') { $count_down_secs += 20; } + + $cmd = '/sbin/kernel-reboot'; + if (! is_executable($cmd)) { + $cmd = '/sbin/reboot'; + $count_down_secs += 30; + } - shell('/sbin/reboot -d4 >/dev/null 2>/dev/null &', $status); + shell($cmd.' -d4 >/dev/null 2>/dev/null &', $status); if ($status == 0) { if ($setup) { $count_down_secs += 50; Modified: branches/1.0/project/astlinux/target_skeleton/sbin/kernel-reboot =================================================================== --- branches/1.0/project/astlinux/target_skeleton/sbin/kernel-reboot 2015-12-04 17:25:25 UTC (rev 7367) +++ branches/1.0/project/astlinux/target_skeleton/sbin/kernel-reboot 2015-12-04 21:56:02 UTC (rev 7368) @@ -188,4 +188,7 @@ sleep $DELAY fi +# Ignore terminating signals from here on +trap '' HUP INT TERM + do_reboot >/dev/console 2>&1 & This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |