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
4696eda3
Commit
4696eda3
authored
Apr 10, 2016
by
Franco Fichtner
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
rc: awareness for crash dumps on /var MFS, closes #874
(cherry picked from commit
66f0288a
)
parent
bb54653a
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
29 additions
and
11 deletions
+29
-11
rc
src/etc/rc
+29
-11
No files found.
src/etc/rc
View file @
4696eda3
...
@@ -70,10 +70,6 @@ fi
...
@@ -70,10 +70,6 @@ fi
# set keyboard map if needed
# set keyboard map if needed
/etc/rc.d/syscons onestart
/etc/rc.d/syscons onestart
# set up and recover a crash dump before activating swap
/usr/local/etc/rc.crashdump
swapon
-a
# set up config directory structure
# set up config directory structure
mkdir
-p
/conf/backup
mkdir
-p
/conf/backup
mkdir
-p
/conf/sshd
mkdir
-p
/conf/sshd
...
@@ -129,30 +125,52 @@ if [ ${USE_MFS_TMPVAR} -ne 0 ]; then
...
@@ -129,30 +125,52 @@ if [ ${USE_MFS_TMPVAR} -ne 0 ]; then
ln
-s
/root/var/db/pkg /var/db/pkg
ln
-s
/root/var/db/pkg /var/db/pkg
fi
fi
if
[
!
-d
/root/var/crash
]
;
then
mkdir
-p
/root/var
mv
/var/crash /root/var
ln
-s
/root/var/crash /var/crash
fi
mount
-t
tmpfs
-o
mode
=
01777 tmpfs /tmp
mount
-t
tmpfs
-o
mode
=
01777 tmpfs /tmp
mount
-t
tmpfs tmpfs /var
mount
-t
tmpfs tmpfs /var
mkdir
-p
/var/db
mkdir
-p
/var/db
ln
-s
/root/var/db/pkg /var/db/pkg
ln
-s
/root/var/db/pkg /var/db/pkg
mkdir
-p
/var
ln
-s
/root/var/crash /var/crash
echo
"done."
echo
"done."
el
if
[
-d
/root/var/db/pkg
]
;
then
el
se
# User must have just disabled RAM disks,
# User must have just disabled RAM disks,
# let's move these back into place.
# let's move these back into place.
if
[
-d
/root/var/db/pkg
]
;
then
mkdir
-p
/var/db
mkdir
-p
/var/db
# reverse the recovery symlink before moving
# reverse the recovery symlink before moving
# back the original database:
# back the original database:
rm
-f
/var/db/pkg
rm
-f
/var/db/pkg
mv
/root/var/db/pkg /var/db/
mv
/root/var/db/pkg /var/db/
fi
if
[
-d
/root/var/crash
]
;
then
mkdir
-p
/var
rm
-f
/var/crash
mv
/root/var/crash /var/crash
fi
fi
fi
# make some directories in /var
# make some directories in /var
mkdir
-p
/var/run /var/log /var/etc /var/db/entropy /var/at/jobs
\
mkdir
-p
/var/run /var/log /var/etc /var/db/entropy /var/at/jobs
\
/var/empty /var/tmp
/var/empty /var/tmp
/var/crash
# work around the fact that shutdown(8) doesn't clean up this file
# work around the fact that shutdown(8) doesn't clean up this file
rm
-f
/var/run/nologin
rm
-f
/var/run/nologin
# set up and recover a crash dump before activating swap
/usr/local/etc/rc.crashdump
swapon
-a
# write /var/run/dmesg.boot
# write /var/run/dmesg.boot
/etc/rc.d/dmesg onestart
/etc/rc.d/dmesg onestart
...
...
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