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
1a86a0bd
Commit
1a86a0bd
authored
Apr 29, 2015
by
Franco Fichtner
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
rc: poperly generate /var/log/gmesg.boot
parent
66d7c5e8
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
9 additions
and
48 deletions
+9
-48
beep.sh
src/bin/beep.sh
+0
-9
system.inc
src/etc/inc/system.inc
+0
-30
rc
src/etc/rc
+9
-6
rc.bootup
src/etc/rc.bootup
+0
-3
No files found.
src/bin/beep.sh
View file @
1a86a0bd
#!/bin/sh
#!/bin/sh
BEEP
=
`
/usr/bin/grep
-c
disablebeep /conf/config.xml
`
BEEP
=
`
/usr/bin/grep
-c
disablebeep /conf/config.xml
`
if
[
$BEEP
-gt
0
]
;
then
if
[
$BEEP
-gt
0
]
;
then
exit
;
exit
;
...
@@ -9,14 +8,6 @@ fi
...
@@ -9,14 +8,6 @@ fi
# Standard note length
# Standard note length
NOTELENGTH
=
"25"
NOTELENGTH
=
"25"
# this is super annoying in VMware, exit if in VMware
if
[
-f
/var/log/dmesg.boot
]
;
then
VMWCOUNT
=
`
/usr/bin/grep
-c
VMware /var/log/dmesg.boot
`
if
[
$VMWCOUNT
-gt
0
]
;
then
exit
;
fi
fi
# Check for different HZ
# Check for different HZ
if
[
-f
/boot/loader.conf
]
;
then
if
[
-f
/boot/loader.conf
]
;
then
HZ
=
`
/usr/bin/grep
-c
kern.hz /boot/loader.conf
`
HZ
=
`
/usr/bin/grep
-c
kern.hz /boot/loader.conf
`
...
...
src/etc/inc/system.inc
View file @
1a86a0bd
...
@@ -1617,36 +1617,6 @@ function system_console_configure()
...
@@ -1617,36 +1617,6 @@ function system_console_configure()
setup_serial_port
();
setup_serial_port
();
}
}
function
system_dmesg_save
()
{
global
$g
;
$dmesg
=
''
;
$_gb
=
exec
(
'/sbin/dmesg'
,
$dmesg
);
/* find last copyright line (output from previous boots may be present) */
$lastcpline
=
0
;
for
(
$i
=
0
;
$i
<
count
(
$dmesg
);
$i
++
)
{
if
(
strstr
(
$dmesg
[
$i
],
"Copyright (c) 1992-"
))
$lastcpline
=
$i
;
}
$fd
=
fopen
(
'/var/log/dmesg.boot'
,
'w'
);
if
(
!
$fd
)
{
printf
(
gettext
(
"Error: cannot open dmesg.boot in system_dmesg_save().%s"
),
"
\n
"
);
return
1
;
}
for
(
$i
=
$lastcpline
;
$i
<
count
(
$dmesg
);
$i
++
)
fwrite
(
$fd
,
$dmesg
[
$i
]
.
"
\n
"
);
fclose
(
$fd
);
unset
(
$dmesg
);
return
0
;
}
function
system_set_harddisk_standby
()
function
system_set_harddisk_standby
()
{
{
global
$g
,
$config
;
global
$g
,
$config
;
...
...
src/etc/rc
View file @
1a86a0bd
...
@@ -64,6 +64,15 @@ else
...
@@ -64,6 +64,15 @@ else
done
done
fi
fi
# write /var/log/dmesg.boot
/etc/rc.d/dmesg onestart
# rewrite message of the day
/etc/rc.d/motd onestart
# set keyboard map if needed
/etc/rc.d/syscons onestart
# !!! migration code for OPNsense <= 15.1.7, do not remove !!!
# !!! migration code for OPNsense <= 15.1.7, do not remove !!!
if
[
-d
"/cf/conf"
]
;
then
if
[
-d
"/cf/conf"
]
;
then
/bin/rm
-f
/conf
/bin/rm
-f
/conf
...
@@ -77,12 +86,6 @@ if [ -d /root/core ]; then
...
@@ -77,12 +86,6 @@ if [ -d /root/core ]; then
/usr/bin/make
-C
/root/core mount
/usr/bin/make
-C
/root/core mount
fi
fi
# rewrite message of the day
/etc/rc.d/motd onestart
# set keyboard map if needed
/etc/rc.d/syscons onestart
# probe for a persistent core dump device
# probe for a persistent core dump device
/usr/local/etc/rc.dumpon
/usr/local/etc/rc.dumpon
...
...
src/etc/rc.bootup
View file @
1a86a0bd
...
@@ -115,9 +115,6 @@ require_once("pfsense-utils.inc");
...
@@ -115,9 +115,6 @@ require_once("pfsense-utils.inc");
echo
"."
;
echo
"."
;
echo
" done.
\n
"
;
echo
" done.
\n
"
;
/* save dmesg output to file */
system_dmesg_save
();
/* start devd (dhclient now uses it) */
/* start devd (dhclient now uses it) */
echo
"Starting device manager (devd)..."
;
echo
"Starting device manager (devd)..."
;
mute_kernel_msgs
();
mute_kernel_msgs
();
...
...
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