aboutsummaryrefslogtreecommitdiffstats
path: root/package/base-files/files.old/lib/firstboot
diff options
context:
space:
mode:
Diffstat (limited to 'package/base-files/files.old/lib/firstboot')
-rw-r--r--package/base-files/files.old/lib/firstboot/05_firstboot_skip10
-rw-r--r--package/base-files/files.old/lib/firstboot/10_determine_parts46
-rw-r--r--package/base-files/files.old/lib/firstboot/10_no_fo_clear_overlay17
-rw-r--r--package/base-files/files.old/lib/firstboot/10_reset_has_mini_fo12
-rw-r--r--package/base-files/files.old/lib/firstboot/20_has_mini_fo13
-rw-r--r--package/base-files/files.old/lib/firstboot/20_no_fo_mount_jffs15
-rw-r--r--package/base-files/files.old/lib/firstboot/20_reset_clear_jffs14
-rw-r--r--package/base-files/files.old/lib/firstboot/30_is_rootfs_mounted10
-rw-r--r--package/base-files/files.old/lib/firstboot/30_no_fo_pivot11
-rw-r--r--package/base-files/files.old/lib/firstboot/30_reset_copy_rom13
-rw-r--r--package/base-files/files.old/lib/firstboot/40_copy_ramoverlay15
-rw-r--r--package/base-files/files.old/lib/firstboot/40_no_fo_copy_ramoverlay14
-rw-r--r--package/base-files/files.old/lib/firstboot/50_pivot17
-rw-r--r--package/base-files/files.old/lib/firstboot/99_10_no_fo_cleanup13
-rw-r--r--package/base-files/files.old/lib/firstboot/99_10_with_fo_cleanup25
15 files changed, 0 insertions, 245 deletions
diff --git a/package/base-files/files.old/lib/firstboot/05_firstboot_skip b/package/base-files/files.old/lib/firstboot/05_firstboot_skip
deleted file mode 100644
index 5f44df6218..0000000000
--- a/package/base-files/files.old/lib/firstboot/05_firstboot_skip
+++ /dev/null
@@ -1,10 +0,0 @@
-#!/bin/sh
-
-check_skip() {
- if [ "$firstboot_skip_next" = "true" ]; then
- return 0
- else
- return 1
- fi
-}
-
diff --git a/package/base-files/files.old/lib/firstboot/10_determine_parts b/package/base-files/files.old/lib/firstboot/10_determine_parts
deleted file mode 100644
index 3f56e32a89..0000000000
--- a/package/base-files/files.old/lib/firstboot/10_determine_parts
+++ /dev/null
@@ -1,46 +0,0 @@
-#!/bin/sh
-
-set_mtd_part() {
- partname="rootfs_data"
- mtdpart="$(find_mtd_part $partname)"
-}
-
-set_rom_part() {
- rom=$(awk '/squashfs/ {print $2}' /proc/mounts)
-}
-
-set_jffs_part() {
- jffs=$(awk '/jffs2/ {print $2}' /proc/mounts)
-}
-
-determine_mtd_part() {
- set_mtd_part
- if [ -z "$mtdpart" ]; then
- echo "MTD partition not found."
- exit 1
- fi
-}
-
-determine_rom_part() {
- check_skip || {
- set_rom_part
- if [ -z "$rom" ]; then
- echo "You do not have a squashfs partition; aborting"
- echo "(firstboot cannot be run on jffs2 based firmwares)"
- exit 1
- fi
- }
-}
-
-determine_jffs2_part() {
- check_skip || {
- set_jffs_part
- }
-}
-
-boot_hook_add switch2jffs determine_mtd_part
-boot_hook_add jffs2reset determine_mtd_part
-boot_hook_add switch2jffs determine_rom_part
-boot_hook_add jffs2reset determine_rom_part
-boot_hook_add switch2jffs determine_jffs2_part
-boot_hook_add jffs2reset determine_jffs2_part
diff --git a/package/base-files/files.old/lib/firstboot/10_no_fo_clear_overlay b/package/base-files/files.old/lib/firstboot/10_no_fo_clear_overlay
deleted file mode 100644
index 8a7d9b066f..0000000000
--- a/package/base-files/files.old/lib/firstboot/10_no_fo_clear_overlay
+++ /dev/null
@@ -1,17 +0,0 @@
-#!/bin/sh
-
-# Copyright (C) 2006-2010 OpenWrt.org
-# Copyright (C) 2010 Vertical Communications
-
-no_fo_clear_overlay() {
- # switch back to squashfs temporarily
- pivot /rom /mnt
-
- # get rid of the old overlay
- umount -l /mnt
-
- # another umount to get rid of the bind from /tmp/root
- umount -l /mnt
-}
-
-boot_hook_add no_fo no_fo_clear_overlay
diff --git a/package/base-files/files.old/lib/firstboot/10_reset_has_mini_fo b/package/base-files/files.old/lib/firstboot/10_reset_has_mini_fo
deleted file mode 100644
index 4e285840a9..0000000000
--- a/package/base-files/files.old/lib/firstboot/10_reset_has_mini_fo
+++ /dev/null
@@ -1,12 +0,0 @@
-#!/bin/sh
-
-# Copyright (C) 2006-2010 OpenWrt.org
-# Copyright (C) 2010 Vertical Communications
-
-reset_check_for_overlay() {
- if grep -qE '(mini_fo|overlay)' /proc/filesystems; then
- reset_has_fo=true
- fi
-}
-
-boot_hook_add jffs2reset reset_check_for_overlay
diff --git a/package/base-files/files.old/lib/firstboot/20_has_mini_fo b/package/base-files/files.old/lib/firstboot/20_has_mini_fo
deleted file mode 100644
index 8ca6a4fe58..0000000000
--- a/package/base-files/files.old/lib/firstboot/20_has_mini_fo
+++ /dev/null
@@ -1,13 +0,0 @@
-#!/bin/sh
-
-# Copyright (C) 2006-2010 OpenWrt.org
-# Copyright (C) 2010 Vertical Communications
-
-check_for_overlay() {
- if ! grep -qE '(mini_fo|overlay)' /proc/filesystems; then
- boot_run_hook no_fo
- exit 1
- fi
-}
-
-boot_hook_add switch2jffs check_for_overlay
diff --git a/package/base-files/files.old/lib/firstboot/20_no_fo_mount_jffs b/package/base-files/files.old/lib/firstboot/20_no_fo_mount_jffs
deleted file mode 100644
index c03714fa6d..0000000000
--- a/package/base-files/files.old/lib/firstboot/20_no_fo_mount_jffs
+++ /dev/null
@@ -1,15 +0,0 @@
-#!/bin/sh
-
-# Copyright (C) 2006-2010 OpenWrt.org
-# Copyright (C) 2010 Vertical Communications
-
-no_fo_mount_jffs() {
- # initialize jffs2
- mount -o noatime "$mtdpart" /overlay -t jffs2 || exit
-
- # workaround to ensure that union can attach properly
- sync
- ls /overlay >/dev/null
-}
-
-boot_hook_add no_fo no_fo_mount_jffs
diff --git a/package/base-files/files.old/lib/firstboot/20_reset_clear_jffs b/package/base-files/files.old/lib/firstboot/20_reset_clear_jffs
deleted file mode 100644
index a3cd24fe9a..0000000000
--- a/package/base-files/files.old/lib/firstboot/20_reset_clear_jffs
+++ /dev/null
@@ -1,14 +0,0 @@
-#!/bin/sh
-
-# Copyright (C) 2006-2010 OpenWrt.org
-# Copyright (C) 2010 Vertical Communications
-
-reset_clear_jffs() {
- [ "$reset_has_fo" = "true" ] && {
- rm -rf $jffs/* 2>&-
- mount -o remount $jffs / 2>&-
- exit 0
- } || reset_has_fo=false
-}
-
-boot_hook_add jffs2reset reset_clear_jffs
diff --git a/package/base-files/files.old/lib/firstboot/30_is_rootfs_mounted b/package/base-files/files.old/lib/firstboot/30_is_rootfs_mounted
deleted file mode 100644
index 7233fd9039..0000000000
--- a/package/base-files/files.old/lib/firstboot/30_is_rootfs_mounted
+++ /dev/null
@@ -1,10 +0,0 @@
-#!/bin/sh
-
-# Copyright (C) 2006-2010 OpenWrt.org
-# Copyright (C) 2010 Vertical Communications
-
-skip_if_rootfs_mounted() {
- mount -o noatime -t jffs2 "$mtdpart" /rom/overlay || exit
-}
-
-boot_hook_add switch2jffs skip_if_rootfs_mounted
diff --git a/package/base-files/files.old/lib/firstboot/30_no_fo_pivot b/package/base-files/files.old/lib/firstboot/30_no_fo_pivot
deleted file mode 100644
index b5c2601ee8..0000000000
--- a/package/base-files/files.old/lib/firstboot/30_no_fo_pivot
+++ /dev/null
@@ -1,11 +0,0 @@
-#!/bin/sh
-
-# Copyright (C) 2006-2010 OpenWrt.org
-# Copyright (C) 2010 Vertical Communications
-
-no_fo_pivot() {
- # switch to the new (empty) jffs2
- fopivot /overlay /rom 1
-}
-
-boot_hook_add no_fo no_fo_pivot
diff --git a/package/base-files/files.old/lib/firstboot/30_reset_copy_rom b/package/base-files/files.old/lib/firstboot/30_reset_copy_rom
deleted file mode 100644
index d91c68947b..0000000000
--- a/package/base-files/files.old/lib/firstboot/30_reset_copy_rom
+++ /dev/null
@@ -1,13 +0,0 @@
-#!/bin/sh
-
-# Copyright (C) 2006-2010 OpenWrt.org
-# Copyright (C) 2010 Vertical Communications
-
-reset_copy_rom() {
- [ "$reset_has_fo" != "true" ] && {
- dupe $jffs $rom
- exit 0
- }
-}
-
-boot_hook_add jffs2reset reset_copy_rom
diff --git a/package/base-files/files.old/lib/firstboot/40_copy_ramoverlay b/package/base-files/files.old/lib/firstboot/40_copy_ramoverlay
deleted file mode 100644
index 39c2edacba..0000000000
--- a/package/base-files/files.old/lib/firstboot/40_copy_ramoverlay
+++ /dev/null
@@ -1,15 +0,0 @@
-#!/bin/sh
-
-# Copyright (C) 2006-2010 OpenWrt.org
-# Copyright (C) 2010 Vertical Communications
-
-copy_ramoverlay() {
- # try to avoid fs changing while copying
- mount -o remount,ro none / 2>&-
- # copy ramoverlay to jffs2
- echo -n "copying files ... "
- cp -a /tmp/root/* /rom/overlay 2>&-
- echo "done"
-}
-
-boot_hook_add switch2jffs copy_ramoverlay
diff --git a/package/base-files/files.old/lib/firstboot/40_no_fo_copy_ramoverlay b/package/base-files/files.old/lib/firstboot/40_no_fo_copy_ramoverlay
deleted file mode 100644
index ced7c1b668..0000000000
--- a/package/base-files/files.old/lib/firstboot/40_no_fo_copy_ramoverlay
+++ /dev/null
@@ -1,14 +0,0 @@
-#!/bin/sh
-
-# Copyright (C) 2006-2010 OpenWrt.org
-# Copyright (C) 2010 Vertical Communications
-
-no_fo_copy_ramoverlay() {
- # copy ramoverlay to jffs2, must be done after switching
- # to the new rootfs to avoid creating opaque directories
- echo -n "copying files ... "
- cp -a /tmp/root/* / >/dev/null 2>&1
- sync
-}
-
-boot_hook_add no_fo no_fo_ramoverlay
diff --git a/package/base-files/files.old/lib/firstboot/50_pivot b/package/base-files/files.old/lib/firstboot/50_pivot
deleted file mode 100644
index 53801d7a8f..0000000000
--- a/package/base-files/files.old/lib/firstboot/50_pivot
+++ /dev/null
@@ -1,17 +0,0 @@
-#!/bin/sh
-
-# Copyright (C) 2006-2010 OpenWrt.org
-# Copyright (C) 2010 Vertical Communications
-
-with_fo_pivot() {
- # switch back to squashfs (temporarily)
- # and park the ramdisk ontop of /tmp/root
- pivot /rom /mnt
- mount -o move /mnt /tmp/root
-
- # /overlay is the overlay
- # /rom is the readonly
- fopivot /overlay /rom
-}
-
-boot_hook_add switch2jffs with_fo_pivot
diff --git a/package/base-files/files.old/lib/firstboot/99_10_no_fo_cleanup b/package/base-files/files.old/lib/firstboot/99_10_no_fo_cleanup
deleted file mode 100644
index 6dedcb1e87..0000000000
--- a/package/base-files/files.old/lib/firstboot/99_10_no_fo_cleanup
+++ /dev/null
@@ -1,13 +0,0 @@
-#!/bin/sh
-
-# Copyright (C) 2006-2010 OpenWrt.org
-# Copyright (C) 2010 Vertical Communications
-
-no_fo_cleanup() {
- echo "done"
- umount -l /overlay
- umount -l /tmp/root
- exit 0
-}
-
-boot_hook_add no_fo no_fo_cleanup
diff --git a/package/base-files/files.old/lib/firstboot/99_10_with_fo_cleanup b/package/base-files/files.old/lib/firstboot/99_10_with_fo_cleanup
deleted file mode 100644
index 560169901c..0000000000
--- a/package/base-files/files.old/lib/firstboot/99_10_with_fo_cleanup
+++ /dev/null
@@ -1,25 +0,0 @@
-#!/bin/sh
-
-# Copyright (C) 2006-2010 OpenWrt.org
-# Copyright (C) 2010 Vertical Communications
-
-with_fo_cleanup() {
- # try to get rid of /tmp/root
- # this will almost always fail
- umount -l /tmp/root 2>&-
- grep -q overlay /proc/filesystems && {
- cd /
- (
- cd /overlay
- find -type l
- ) | while read FILE; do
- [ -z "$FILE" ] && break
- if ls -la "$FILE" 2>&- | grep -q '(overlay-whiteout)'; then
- rm -f "$FILE"
- fi
- done
- }
- exit 0
-}
-
-boot_hook_add switch2jffs with_fo_cleanup