mirror of
https://github.com/coolsnowwolf/lede.git
synced 2025-04-16 04:13:31 +00:00
base-files: force remount ext4 rootfs when power-off by accident last time
This commit is contained in:
parent
5969d62e82
commit
0747f72a7f
@ -17,6 +17,10 @@ missing_lines() {
|
|||||||
do_mount_root() {
|
do_mount_root() {
|
||||||
mount_root
|
mount_root
|
||||||
boot_run_hook preinit_mount_root
|
boot_run_hook preinit_mount_root
|
||||||
|
have_ro_ext4=$(/bin/cat /proc/mounts |/bin/grep ' / ext4'|/bin/grep 'ro'|/usr/bin/wc -l)
|
||||||
|
if [ "$have_ro_ext4" != "0" ]; then
|
||||||
|
/usr/bin/mount -o remount,rw,noatime /
|
||||||
|
fi
|
||||||
[ -f /sysupgrade.tgz -o -f /tmp/sysupgrade.tar ] && {
|
[ -f /sysupgrade.tgz -o -f /tmp/sysupgrade.tar ] && {
|
||||||
echo "- config restore -"
|
echo "- config restore -"
|
||||||
cp /etc/passwd /etc/group /etc/shadow /tmp
|
cp /etc/passwd /etc/group /etc/shadow /tmp
|
||||||
|
Loading…
Reference in New Issue
Block a user