early fsck
Signed-off-by: fbt <fbt@fleshless.org>
This commit is contained in:
parent
431f7e145e
commit
db4eb9162b
5
rc.conf
5
rc.conf
|
@ -11,9 +11,12 @@ cfg_hostname='spark'
|
||||||
# Uncomment and change this to yours
|
# Uncomment and change this to yours
|
||||||
#cfg_timezone='Europe/Moscow'
|
#cfg_timezone='Europe/Moscow'
|
||||||
|
|
||||||
|
# Early fsck, if you don't have such a step in your initrd
|
||||||
|
#cfg_early_fsck=1
|
||||||
|
|
||||||
# Services that start with @ are executed in parallel
|
# Services that start with @ are executed in parallel
|
||||||
cfg_services+=(
|
cfg_services+=(
|
||||||
'fsck' 'mount' 'sysctl' 'rsyslogd'
|
'mount' 'sysctl' 'rsyslogd'
|
||||||
'@lo.iface' '@scron' @agetty-tty{2..6}
|
'@lo.iface' '@scron' @agetty-tty{2..6}
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
10
rc.in
10
rc.in
|
@ -118,6 +118,8 @@ rc.remount_root() {
|
||||||
}
|
}
|
||||||
|
|
||||||
rc.boot() {
|
rc.boot() {
|
||||||
|
(( cfg_early_fsck )) && rc.fsck
|
||||||
|
|
||||||
rc.mount
|
rc.mount
|
||||||
rc.tmpfiles
|
rc.tmpfiles
|
||||||
rc.hostname
|
rc.hostname
|
||||||
|
@ -181,6 +183,14 @@ rc.timezone() {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
rc.fsck() {
|
||||||
|
declare root_rw=0
|
||||||
|
touch /rc-write-test && root_rw=1
|
||||||
|
(( root_rw )) && mount -o remount,ro /
|
||||||
|
fsck -A -C -p
|
||||||
|
(( root_rw )) && mount -o remount,rw /
|
||||||
|
}
|
||||||
|
|
||||||
rc.main() {
|
rc.main() {
|
||||||
source "@ETC@/rc.conf"
|
source "@ETC@/rc.conf"
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user