Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
O
OpnSense
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Kulya
OpnSense
Commits
960f0968
Commit
960f0968
authored
Dec 28, 2014
by
Franco Fichtner
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
rc: rework reboot
see previous
parent
c8cbd847
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
27 deletions
+13
-27
rc.initial.reboot
src/etc/rc.initial.reboot
+13
-27
No files found.
src/etc/rc.initial.reboot
View file @
960f0968
...
@@ -2,8 +2,6 @@
...
@@ -2,8 +2,6 @@
<?php
<?php
/*
/*
part of m0n0wall (http://m0n0.ch/wall)
Copyright (C) 2003-2004 Manuel Kasper <mk@neon1.net>.
Copyright (C) 2003-2004 Manuel Kasper <mk@neon1.net>.
All rights reserved.
All rights reserved.
...
@@ -29,32 +27,20 @@
...
@@ -29,32 +27,20 @@
POSSIBILITY OF SUCH DAMAGE.
POSSIBILITY OF SUCH DAMAGE.
*/
*/
/* parse the configuration and include all functions used below */
require_once
(
'config.inc'
);
require_once
(
"config.inc"
);
require_once
(
'functions.inc'
);
require_once
(
"functions.inc"
);
require_once
(
'filter.inc'
);
require_once
(
"filter.inc"
);
require_once
(
'captiveportal.inc'
);
require_once
(
"captiveportal.inc"
);
$fp
=
fopen
(
'php://stdin'
,
'r'
);
echo
<<<EOD
{$g['product_name']} will reboot. This may take a few minutes, depending on your hardware.
Do you want to proceed [y|n]?
$fp
=
fopen
(
'php://stdin'
,
'r'
);
EOD;
if
(
strcasecmp
(
chop
(
fgets
(
$fp
)),
"y"
)
==
0
)
{
echo
"
\n
{
$g
[
'product_name'
]
}
will reboot.
\n
"
;
echo
"This may take a minute, depending on your hardware.
\n
"
;
echo
<<<EOD
echo
"
\n
Do you want to proceed [y|n]? "
;
{$g['product_name']} is rebooting now.
EOD;
if
(
strcasecmp
(
chop
(
fgets
(
$fp
)),
'y'
)
==
0
)
{
echo
"
\n
{
$g
[
'product_name'
]
}
is rebooting now.
\n\n
"
;
system_reboot_sync
();
system_reboot_sync
();
}
}
fclose
(
$fp
);
?>
fclose
(
$fp
);
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment