summaryrefslogtreecommitdiff
path: root/package/base-files/files
diff options
context:
space:
mode:
authorFlorian Fainelli <florian@openwrt.org>2010-03-21 17:16:50 +0000
committerFlorian Fainelli <florian@openwrt.org>2010-03-21 17:16:50 +0000
commit7af8ee04812f647ce74adbe04f0d5d18a39bbd29 (patch)
tree9a50a2973e0866572e2cf8394d65dba645ac3c08 /package/base-files/files
parente7f046805af93c3af6d318907033cf0d803e4b34 (diff)
downloadmtk-20170518-7af8ee04812f647ce74adbe04f0d5d18a39bbd29.zip
mtk-20170518-7af8ee04812f647ce74adbe04f0d5d18a39bbd29.tar.gz
mtk-20170518-7af8ee04812f647ce74adbe04f0d5d18a39bbd29.tar.bz2
change from /jffs to /overlay, patch from Daniel Dickinson
SVN-Revision: 20356
Diffstat (limited to 'package/base-files/files')
-rw-r--r--package/base-files/files/lib/firstboot/20_no_fo_mount_jffs4
-rw-r--r--package/base-files/files/lib/firstboot/30_is_rootfs_mounted2
-rw-r--r--package/base-files/files/lib/firstboot/30_no_fo_pivot2
-rw-r--r--package/base-files/files/lib/firstboot/40_copy_ramoverlay2
-rw-r--r--package/base-files/files/lib/firstboot/50_pivot4
-rw-r--r--package/base-files/files/lib/firstboot/99_10_no_fo_cleanup2
-rw-r--r--package/base-files/files/lib/functions/boot.sh3
-rw-r--r--package/base-files/files/lib/preinit/40_mount_jffs23
-rw-r--r--package/base-files/files/lib/preinit/70_pivot_jffs2_root3
-rw-r--r--package/base-files/files/lib/upgrade/common.sh10
-rwxr-xr-xpackage/base-files/files/sbin/firstboot4
11 files changed, 20 insertions, 19 deletions
diff --git a/package/base-files/files/lib/firstboot/20_no_fo_mount_jffs b/package/base-files/files/lib/firstboot/20_no_fo_mount_jffs
index da914b1..8a1d4e0 100644
--- a/package/base-files/files/lib/firstboot/20_no_fo_mount_jffs
+++ b/package/base-files/files/lib/firstboot/20_no_fo_mount_jffs
@@ -5,11 +5,11 @@
no_fo_mount_jffs() {
# initialize jffs2
- mount "$mtdpart" /jffs -t jffs2 || exit
+ mount "$mtdpart" /overlay -t jffs2 || exit
# workaround to ensure that union can attach properly
sync
- ls /jffs >/dev/null
+ ls /overlay >/dev/null
}
boot_hook_add no_fo no_fo_mount_jffs
diff --git a/package/base-files/files/lib/firstboot/30_is_rootfs_mounted b/package/base-files/files/lib/firstboot/30_is_rootfs_mounted
index 7c3fe6c..e2ba01d 100644
--- a/package/base-files/files/lib/firstboot/30_is_rootfs_mounted
+++ b/package/base-files/files/lib/firstboot/30_is_rootfs_mounted
@@ -4,7 +4,7 @@
# Copyright (C) 2010 Vertical Communications
skip_if_rootfs_mounted() {
- mount "$mtdpart" /rom/jffs -t jffs2 || exit
+ mount "$mtdpart" /rom/overlay -t jffs2 || exit
}
boot_hook_add switch2jffs skip_if_rootfs_mounted
diff --git a/package/base-files/files/lib/firstboot/30_no_fo_pivot b/package/base-files/files/lib/firstboot/30_no_fo_pivot
index cb82cde..b5c2601 100644
--- a/package/base-files/files/lib/firstboot/30_no_fo_pivot
+++ b/package/base-files/files/lib/firstboot/30_no_fo_pivot
@@ -5,7 +5,7 @@
no_fo_pivot() {
# switch to the new (empty) jffs2
- fopivot /jffs /rom 1
+ fopivot /overlay /rom 1
}
boot_hook_add no_fo no_fo_pivot
diff --git a/package/base-files/files/lib/firstboot/40_copy_ramoverlay b/package/base-files/files/lib/firstboot/40_copy_ramoverlay
index 4b6a882..39c2eda 100644
--- a/package/base-files/files/lib/firstboot/40_copy_ramoverlay
+++ b/package/base-files/files/lib/firstboot/40_copy_ramoverlay
@@ -8,7 +8,7 @@ copy_ramoverlay() {
mount -o remount,ro none / 2>&-
# copy ramoverlay to jffs2
echo -n "copying files ... "
- cp -a /tmp/root/* /rom/jffs 2>&-
+ cp -a /tmp/root/* /rom/overlay 2>&-
echo "done"
}
diff --git a/package/base-files/files/lib/firstboot/50_pivot b/package/base-files/files/lib/firstboot/50_pivot
index fa1c7b5..53801d7 100644
--- a/package/base-files/files/lib/firstboot/50_pivot
+++ b/package/base-files/files/lib/firstboot/50_pivot
@@ -9,9 +9,9 @@ with_fo_pivot() {
pivot /rom /mnt
mount -o move /mnt /tmp/root
- # /jffs is the overlay
+ # /overlay is the overlay
# /rom is the readonly
- fopivot /jffs /rom
+ fopivot /overlay /rom
}
boot_hook_add switch2jffs with_fo_pivot
diff --git a/package/base-files/files/lib/firstboot/99_10_no_fo_cleanup b/package/base-files/files/lib/firstboot/99_10_no_fo_cleanup
index 5eddfb1..6dedcb1 100644
--- a/package/base-files/files/lib/firstboot/99_10_no_fo_cleanup
+++ b/package/base-files/files/lib/firstboot/99_10_no_fo_cleanup
@@ -5,7 +5,7 @@
no_fo_cleanup() {
echo "done"
- umount -l /jffs
+ umount -l /overlay
umount -l /tmp/root
exit 0
}
diff --git a/package/base-files/files/lib/functions/boot.sh b/package/base-files/files/lib/functions/boot.sh
index 96c1c59..e6f6633 100644
--- a/package/base-files/files/lib/functions/boot.sh
+++ b/package/base-files/files/lib/functions/boot.sh
@@ -42,7 +42,7 @@ dupe() { # <new_root> <old_root>
{
cd $2
find . -xdev -type d
- echo "./dev ./jffs ./mnt ./proc ./tmp"
+ echo "./dev ./overlay ./mnt ./proc ./tmp"
# xdev skips mounted directories
cd $1
} | xargs mkdir -p
@@ -69,7 +69,6 @@ pivot() { # <new_root> <old_root>
mount -o move $2/dev /dev
mount -o move $2/tmp /tmp
mount -o move $2/sys /sys 2>&-
- mount -o move $2/jffs /jffs 2>&-
mount -o move $2/overlay /overlay 2>&-
return 0
}
diff --git a/package/base-files/files/lib/preinit/40_mount_jffs2 b/package/base-files/files/lib/preinit/40_mount_jffs2
index 99fe262..cb743ea 100644
--- a/package/base-files/files/lib/preinit/40_mount_jffs2
+++ b/package/base-files/files/lib/preinit/40_mount_jffs2
@@ -3,7 +3,8 @@
# Copyright (C) 2010 Vertical Communications
find_mount_jffs2() {
- mount "$(find_mtd_part rootfs_data)" /jffs -t jffs2
+ mkdir -p /tmp/overlay
+ mount "$(find_mtd_part rootfs_data)" /tmp/overlay -t jffs2
}
jffs2_not_mounted() {
diff --git a/package/base-files/files/lib/preinit/70_pivot_jffs2_root b/package/base-files/files/lib/preinit/70_pivot_jffs2_root
index f0a2a55..821bfb1 100644
--- a/package/base-files/files/lib/preinit/70_pivot_jffs2_root
+++ b/package/base-files/files/lib/preinit/70_pivot_jffs2_root
@@ -5,7 +5,8 @@
rootfs_pivot() {
check_skip || jffs2_not_mounted || {
echo "switching to jffs2"
- fopivot /jffs /rom && pi_mount_skip_next=true
+ mount -o move /tmp/overlay /overlay 2>&-
+ fopivot /overlay /rom && pi_mount_skip_next=true
}
}
diff --git a/package/base-files/files/lib/upgrade/common.sh b/package/base-files/files/lib/upgrade/common.sh
index 3beb648..970016e 100644
--- a/package/base-files/files/lib/upgrade/common.sh
+++ b/package/base-files/files/lib/upgrade/common.sh
@@ -35,7 +35,7 @@ install_bin() { # <file> [ <symlink> ... ]
pivot() { # <new_root> <old_root>
mount | grep "on $1 type" 2>&- 1>&- || mount -o bind $1 $1
- mkdir -p $1$2 $1/proc $1/dev $1/tmp $1/jffs && \
+ mkdir -p $1$2 $1/proc $1/dev $1/tmp $1/overlay && \
mount -o move /proc $1/proc && \
pivot_root $1 $1$2 || {
umount $1 $1
@@ -43,7 +43,7 @@ pivot() { # <new_root> <old_root>
}
mount -o move $2/dev /dev
mount -o move $2/tmp /tmp
- mount -o move $2/jffs /jffs 2>&-
+ mount -o move $2/overlay /overlay 2>&-
return 0
}
@@ -63,9 +63,9 @@ run_ramfs() { # <command> [...]
mount -o remount,ro /mnt
umount -l /mnt
- grep /jffs /proc/mounts > /dev/null && {
- mount -o remount,ro /jffs
- umount -l /jffs
+ grep /overlay /proc/mounts > /dev/null && {
+ mount -o remount,ro /overlay
+ umount -l /overlay
}
# spawn a new shell from ramdisk to reduce the probability of cache issues
diff --git a/package/base-files/files/sbin/firstboot b/package/base-files/files/sbin/firstboot
index e9994de..4da2991 100755
--- a/package/base-files/files/sbin/firstboot
+++ b/package/base-files/files/sbin/firstboot
@@ -27,8 +27,8 @@ if [ "${0##*/}" = "firstboot" ]; then
boot_run_hook jffs2reset
else
mtd erase "$partname"
- mount "$mtdpart" /jffs -t jffs2
- fopivot /jffs /rom 1
+ mount "$mtdpart" /overlay -t jffs2
+ fopivot /overlay /rom 1
fi
fi