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
4fe76dde
Commit
4fe76dde
authored
Mar 10, 2015
by
Franco Fichtner
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
rc: on cdrom images, the config is bootstrapped afterwards, meh
parent
82cfdeb4
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
38 additions
and
39 deletions
+38
-39
rc
src/etc/rc
+38
-39
No files found.
src/etc/rc
View file @
4fe76dde
...
@@ -17,7 +17,6 @@ HOME=/
...
@@ -17,7 +17,6 @@ HOME=/
PATH
=
/sbin:/bin:/usr/sbin:/usr/bin:/usr/local/bin:/usr/local/sbin
PATH
=
/sbin:/bin:/usr/sbin:/usr/bin:/usr/local/bin:/usr/local/sbin
export
HOME PATH
export
HOME PATH
USE_MFS_TMPVAR
=
`
/usr/bin/grep
-c
use_mfs_tmpvar /conf/config.xml
`
PLATFORM
=
`
/bin/cat /usr/local/etc/platform
`
PLATFORM
=
`
/bin/cat /usr/local/etc/platform
`
if
[
"
${
PLATFORM
}
"
=
"nanobsd"
]
;
then
if
[
"
${
PLATFORM
}
"
=
"nanobsd"
]
;
then
...
@@ -87,37 +86,6 @@ else
...
@@ -87,37 +86,6 @@ else
/bin/rm
-rf
/cf
/bin/rm
-rf
/cf
fi
fi
# !!! migration code for OPNsense <= 15.1.7, do not remove !!!
# !!! migration code for OPNsense <= 15.1.7, do not remove !!!
if
[
"
${
PLATFORM
}
"
=
"nanobsd"
]
||
[
${
USE_MFS_TMPVAR
}
-gt
0
]
;
then
USE_MFS_TMP_SIZE
=
`
/usr/bin/grep use_mfs_tmp_size /conf/config.xml | /usr/bin/cut
-f2
-d
'>'
| /usr/bin/cut
-f1
-d
'<'
`
if
[
!
-z
${
USE_MFS_TMP_SIZE
}
]
&&
[
${
USE_MFS_TMP_SIZE
}
-gt
0
]
;
then
tmpsize
=
"
${
USE_MFS_TMP_SIZE
}
m"
else
tmpsize
=
"40m"
fi
USE_MFS_VAR_SIZE
=
`
/usr/bin/grep use_mfs_var_size /conf/config.xml | /usr/bin/cut
-f2
-d
'>'
| /usr/bin/cut
-f1
-d
'<'
`
if
[
!
-z
${
USE_MFS_VAR_SIZE
}
]
&&
[
${
USE_MFS_VAR_SIZE
}
-gt
0
]
;
then
varsize
=
"
${
USE_MFS_VAR_SIZE
}
m"
else
varsize
=
"60m"
fi
echo
-n
"Setting up memory disks..."
if
[
!
-d
/root/var/db/pkg
]
;
then
/bin/mkdir
-p
/root/var/db
/bin/mv /var/db/pkg /root/var/db/
fi
mdmfs
-S
-M
-s
${
tmpsize
}
md /tmp
mdmfs
-S
-M
-s
${
varsize
}
md /var
/bin/mkdir
-p
/var/db
/bin/ln
-s
/root/var/db/pkg /var/db/pkg
echo
"done."
fi
fi
fi
# mount repo if available
# mount repo if available
...
@@ -168,16 +136,47 @@ fi
...
@@ -168,16 +136,47 @@ fi
rm
-f
/etc/spwd.db.tmp
rm
-f
/etc/spwd.db.tmp
/usr/sbin/pwd_mkdb
-d
/etc/ /etc/master.passwd
/usr/sbin/pwd_mkdb
-d
/etc/ /etc/master.passwd
if
[
"
$PLATFORM
"
=
"pfSense"
]
&&
[
${
USE_MFS_TMPVAR
}
-eq
0
]
;
then
/sbin/mdmfs
-S
-M
-s
4m md /var/run
fi
# Enable console output if its muted.
# Enable console output if its muted.
/sbin/conscontrol mute off
>
/dev/null
/sbin/conscontrol mute off
>
/dev/null
if
[
"
$PLATFORM
"
=
"cdrom"
-o
"
$PLATFORM
"
=
"nanobsd"
-o
${
USE_MFS_TMPVAR
}
-gt
0
]
;
then
if
[
"
$PLATFORM
"
!=
"cdrom"
]
;
then
# do nothing for cdrom and nanobsd platforms
USE_MFS_TMPVAR
=
`
/usr/bin/grep
-c
use_mfs_tmpvar /conf/config.xml
`
else
if
[
"
$PLATFORM
"
=
"pfSense"
]
&&
[
${
USE_MFS_TMPVAR
}
-eq
0
]
;
then
mdmfs
-S
-M
-s
4m md /var/run
fi
if
[
"
${
PLATFORM
}
"
=
"nanobsd"
]
||
[
${
USE_MFS_TMPVAR
}
-gt
0
]
;
then
USE_MFS_TMP_SIZE
=
`
/usr/bin/grep use_mfs_tmp_size /conf/config.xml | /usr/bin/cut
-f2
-d
'>'
| /usr/bin/cut
-f1
-d
'<'
`
if
[
!
-z
${
USE_MFS_TMP_SIZE
}
]
&&
[
${
USE_MFS_TMP_SIZE
}
-gt
0
]
;
then
tmpsize
=
"
${
USE_MFS_TMP_SIZE
}
m"
else
tmpsize
=
"40m"
fi
USE_MFS_VAR_SIZE
=
`
/usr/bin/grep use_mfs_var_size /conf/config.xml | /usr/bin/cut
-f2
-d
'>'
| /usr/bin/cut
-f1
-d
'<'
`
if
[
!
-z
${
USE_MFS_VAR_SIZE
}
]
&&
[
${
USE_MFS_VAR_SIZE
}
-gt
0
]
;
then
varsize
=
"
${
USE_MFS_VAR_SIZE
}
m"
else
varsize
=
"60m"
fi
echo
-n
"Setting up memory disks..."
if
[
!
-d
/root/var/db/pkg
]
;
then
/bin/mkdir
-p
/root/var/db
/bin/mv /var/db/pkg /root/var/db/
fi
mdmfs
-S
-M
-s
${
tmpsize
}
md /tmp
mdmfs
-S
-M
-s
${
varsize
}
md /var
/bin/mkdir
-p
/var/db
/bin/ln
-s
/root/var/db/pkg /var/db/pkg
echo
"done."
fi
/sbin/swapon
-a
/sbin/swapon
-a
/usr/local/etc/rc.savecore
/usr/local/etc/rc.savecore
...
...
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