mirror of
https://github.com/Ysurac/openmptcprouter.git
synced 2025-03-09 15:40:20 +00:00
Revert "Merge branch 'develop'"
This reverts commitbf16c8f251, reversing changes made to15b5e54963.
This commit is contained in:
parent
0ff958171e
commit
1b7bac2e0a
171 changed files with 570331 additions and 781 deletions
30
root/package/base-files/files/lib/preinit/80_mount_root
Normal file
30
root/package/base-files/files/lib/preinit/80_mount_root
Normal file
|
|
@ -0,0 +1,30 @@
|
|||
#!/bin/sh
|
||||
# Copyright (C) 2006 OpenWrt.org
|
||||
# Copyright (C) 2010 Vertical Communications
|
||||
# Copyright (C) 2018 Ycarus (Yannick Chabanois) <ycarus@zugaina.org>
|
||||
|
||||
do_mount_root() {
|
||||
mount_root
|
||||
boot_run_hook preinit_mount_root
|
||||
[ -e /dev/sda1 ] && mount /dev/sda1 /boot >/dev/null 2>&1
|
||||
[ -f /boot/sysupgrade.tgz ] && {
|
||||
mv /boot/sysupgrade.tgz /
|
||||
}
|
||||
[ -e /dev/sda1 ] && umount /boot >/dev/null 2>&1
|
||||
[ -f /sysupgrade.tgz ] && {
|
||||
echo "- config restore -"
|
||||
cd /
|
||||
tar xzf sysupgrade.tgz
|
||||
}
|
||||
}
|
||||
[ -n "$(mount | grep ext4 | grep ro)" ] && {
|
||||
[ -e /dev/mmcblk0p2 ] && {
|
||||
echo "Checking ext4 FS on mmcblk0p2..."
|
||||
/usr/sbin/e2fsck -y -f /dev/mmcblk0p2 >/dev/null 2>&1
|
||||
}
|
||||
[ -e /dev/sda2 ] && {
|
||||
echo "Checking ext4 FS on sda2..."
|
||||
/usr/sbin/e2fsck -y -f /dev/sda2 >/dev/null 2>&1
|
||||
}
|
||||
}
|
||||
[ "$INITRAMFS" = "1" ] || boot_hook_add preinit_main do_mount_root
|
||||
Loading…
Add table
Add a link
Reference in a new issue