mirror of
https://github.com/motioneye-project/motioneyeos.git
synced 2025-07-27 05:06:39 +00:00
Mount overlayfs after loading fs module
This commit is contained in:
parent
e96d87aaf7
commit
832d4574be
@ -6,12 +6,21 @@ mount_fs() {
|
|||||||
msg_begin "Mounting filesystems"
|
msg_begin "Mounting filesystems"
|
||||||
/bin/mount -T /etc/fstab.disk -a &&
|
/bin/mount -T /etc/fstab.disk -a &&
|
||||||
/bin/mount -T /etc/fstab.extra -a &&
|
/bin/mount -T /etc/fstab.extra -a &&
|
||||||
if grep -qw overlay /proc/filesystems; then /bin/mount -T /data/etc/fstab.overlay -a; fi &&
|
|
||||||
if [[ -r /data/etc/fstab.user ]]; then /bin/mount -T /data/etc/fstab.user -a; fi
|
if [[ -r /data/etc/fstab.user ]]; then /bin/mount -T /data/etc/fstab.user -a; fi
|
||||||
|
|
||||||
test $? == 0 && msg_done || msg_fail
|
test $? == 0 && msg_done || msg_fail
|
||||||
}
|
}
|
||||||
|
|
||||||
|
mount_overlay() {
|
||||||
|
modprobe overlay &>/dev/null
|
||||||
|
grep -qw overlay /proc/filesystems || return
|
||||||
|
|
||||||
|
msg_begin "Mounting overlay filesystems"
|
||||||
|
grep -oE '/data/.overlay-[^ ]+' /etc/fstab.overlay | xargs mkdir -p
|
||||||
|
/bin/mount -T /etc/fstab.overlay -a
|
||||||
|
test $? == 0 && msg_done || msg_fail
|
||||||
|
}
|
||||||
|
|
||||||
remount_rw() {
|
remount_rw() {
|
||||||
msg_begin "Remounting boot partition read-write"
|
msg_begin "Remounting boot partition read-write"
|
||||||
mount -o remount,rw /boot
|
mount -o remount,rw /boot
|
||||||
@ -30,6 +39,7 @@ mk_tty_login() {
|
|||||||
case "$1" in
|
case "$1" in
|
||||||
start)
|
start)
|
||||||
mount_fs
|
mount_fs
|
||||||
|
mount_overlay
|
||||||
|
|
||||||
# we need to source conf again, now that /data is available
|
# we need to source conf again, now that /data is available
|
||||||
source /etc/init.d/os_conf
|
source /etc/init.d/os_conf
|
||||||
|
Loading…
x
Reference in New Issue
Block a user