Feature #6639 » nextboot-menu-options-2.3.diff
src/etc/rc | ||
---|---|---|
97 | 97 |
/sbin/ddb /etc/ddb.conf |
98 | 98 |
fi |
99 | 99 | |
100 |
if [ -e /root/force_fsck ]; then |
|
101 |
echo "Forcing filesystem(s) check..." |
|
102 |
/sbin/fsck -y -F -t ufs |
|
100 |
fsck_forced_iterations=`/bin/kenv pfsense.fsck.force` |
|
101 |
if [ ! -z "${fsck_forced_iterations}" ]; then |
|
102 |
echo "Forcing filesystem(s) check (${fsck_forced_iterations} times)..." |
|
103 |
while [ ${fsck_forced_iterations} -gt 0 ]; do |
|
104 |
/sbin/fsck -y -F -t ufs |
|
105 |
fsck_forced_iterations=$((fsck_forced_iterations - 1)) |
|
106 |
done |
|
103 | 107 |
fi |
104 | 108 | |
105 | 109 |
if [ "${PLATFORM}" != "cdrom" ]; then |
src/etc/rc.initial.reboot | ||
---|---|---|
65 | 65 |
$fp = fopen('php://stdin', 'r'); |
66 | 66 | |
67 | 67 |
echo "\n" . sprintf(gettext("%s will reboot. This may take a few minutes, depending on your hardware."), $g['product_name']) . "\n"; |
68 |
echo gettext("Do you want to proceed [y|n]?") . " "; |
|
68 |
echo gettext("Do you want to proceed?") . "\n\n"; |
|
69 |
echo " " . gettext("Y: Reboot normally") . "\n"; |
|
70 |
echo " " . gettext("S: Reboot into Single User Mode (requires console access!)") . "\n"; |
|
71 |
echo " " . gettext("F: Reboot and run a filesystem check") . "\n\n"; |
|
69 | 72 | |
70 |
if (strcasecmp(chop(fgets($fp)), "y") == 0) { |
|
71 |
echo "\n" . sprintf(gettext("%s is rebooting now."), $g['product_name']) . "\n"; |
|
72 |
system_reboot_sync(); |
|
73 |
echo gettext("Enter an option:") . " "; |
|
74 | ||
75 |
switch (strtolower(chop(fgets($fp)))) { |
|
76 |
case "s": |
|
77 |
mwexec('/sbin/nextboot -o "-s" -k kernel'); |
|
78 |
echo "\n" . sprintf(gettext("%s is rebooting into single user mode now."), $g['product_name']) . "\n"; |
|
79 |
system_reboot_sync(); |
|
80 |
break; |
|
81 |
case "f": |
|
82 |
mwexec('/sbin/nextboot -e "pfsense.fsck.force=5"'); |
|
83 |
echo "\n" . sprintf(gettext("%s is rebooting for a filesystem check now."), $g['product_name']) . "\n"; |
|
84 |
system_reboot_sync(); |
|
85 |
break; |
|
86 |
case "y": |
|
87 |
echo "\n" . sprintf(gettext("%s is rebooting now."), $g['product_name']) . "\n"; |
|
88 |
system_reboot_sync(); |
|
89 |
break; |
|
73 | 90 |
} |
74 | 91 | |
75 | 92 |
fclose($fp); |
76 | ||
93 |
echo "\n"; |
|
77 | 94 |
?> |
- « Previous
- 1
- 2
- Next »