diff options
Diffstat (limited to 'meta/packages/initscripts/initscripts-1.0/openmn')
3 files changed, 87 insertions, 0 deletions
diff --git a/meta/packages/initscripts/initscripts-1.0/openmn/extractfs b/meta/packages/initscripts/initscripts-1.0/openmn/extractfs new file mode 100755 index 0000000000..7e57dedd2d --- /dev/null +++ b/meta/packages/initscripts/initscripts-1.0/openmn/extractfs | |||
| @@ -0,0 +1,7 @@ | |||
| 1 | #!/bin/sh | ||
| 2 | |||
| 3 | if (grep -q 'tmpfs.*/var.*tmpfs' /proc/mounts) | ||
| 4 | then | ||
| 5 | test "$VERBOSE" != no && echo "Copying /var filesystem..." | ||
| 6 | cp -a /boot/var / | ||
| 7 | fi | ||
diff --git a/meta/packages/initscripts/initscripts-1.0/openmn/packages b/meta/packages/initscripts/initscripts-1.0/openmn/packages new file mode 100755 index 0000000000..2566487d2d --- /dev/null +++ b/meta/packages/initscripts/initscripts-1.0/openmn/packages | |||
| @@ -0,0 +1,63 @@ | |||
| 1 | #!/bin/sh | ||
| 2 | # Original author: ??? | ||
| 3 | # | ||
| 4 | # Additions by Steph Meslin-Weber: | ||
| 5 | # x Percentage display | ||
| 6 | # x Dot display of dependency installations | ||
| 7 | # - removed both of above | ||
| 8 | # - display is now X of Y packages and current package name being installed | ||
| 9 | |||
| 10 | #. /etc/default/rcS | ||
| 11 | |||
| 12 | reconfigure () { | ||
| 13 | pkg=$1 | ||
| 14 | path=$2 | ||
| 15 | isdependent=$3 | ||
| 16 | test -e "$path/info/$pkg.control" || return 1 | ||
| 17 | depends="`cat $path/info/$pkg.control|grep Depends|cut -d: -f2`" | ||
| 18 | |||
| 19 | # make sure we haven't already installed this package | ||
| 20 | isthere=`cat /tmp/.configured.list|grep $pkg` | ||
| 21 | if test "$isthere" != ""; then | ||
| 22 | return 1 | ||
| 23 | fi | ||
| 24 | |||
| 25 | if test "$depends" != ""; then | ||
| 26 | for dep in $depends; do | ||
| 27 | (echo $log|grep $dep >/dev/null 2>&1) || ( reconfigure $dep $path "$max" "$pkg" && log="$log $dep"; ) | ||
| 28 | done | ||
| 29 | fi | ||
| 30 | |||
| 31 | echo -ne " ${pkg}" | ||
| 32 | |||
| 33 | test -e "$path/info/$pkg.prerm" && $path/info/$pkg.prerm unconfigure >/dev/null 2>&1 | ||
| 34 | test -e "$path/info/$pkg.postinst" && $path/info/$pkg.postinst configure >/dev/null 2>&1 | ||
| 35 | |||
| 36 | log="$log $pkg" | ||
| 37 | |||
| 38 | # append the installed package name to the list | ||
| 39 | echo -ne "$pkg\n" >> /tmp/.configured.list | ||
| 40 | |||
| 41 | echo | ||
| 42 | return 0 | ||
| 43 | } | ||
| 44 | |||
| 45 | if test ! -e /etc/.configured; then | ||
| 46 | echo "Reconfiguring all packages installed to root:" | ||
| 47 | |||
| 48 | # create unique packages list file | ||
| 49 | rm -f /tmp/.configured.list | ||
| 50 | touch /tmp/.configured.list | ||
| 51 | |||
| 52 | log="" | ||
| 53 | |||
| 54 | for control in /usr/lib/ipkg/info/*.control; do | ||
| 55 | package=`echo $control|sed -e 's,.*/,,g; s,\.control,,g;'` | ||
| 56 | (echo $log|grep $package >/dev/null 2>&1) || reconfigure $package /usr/lib/ipkg | ||
| 57 | done | ||
| 58 | |||
| 59 | # cleanup unique packages list file | ||
| 60 | rm -f /tmp/.configured.list | ||
| 61 | fi | ||
| 62 | |||
| 63 | test -f /usr/lib/ipkg/info/task-ramses || ipkg install task-ramses | ||
diff --git a/meta/packages/initscripts/initscripts-1.0/openmn/umountfs b/meta/packages/initscripts/initscripts-1.0/openmn/umountfs new file mode 100755 index 0000000000..399194109b --- /dev/null +++ b/meta/packages/initscripts/initscripts-1.0/openmn/umountfs | |||
| @@ -0,0 +1,17 @@ | |||
| 1 | #! /bin/sh | ||
| 2 | # | ||
| 3 | # umountfs Turn off swap and unmount all local filesystems. | ||
| 4 | # | ||
| 5 | |||
| 6 | PATH=/sbin:/bin:/usr/sbin:/usr/bin | ||
| 7 | |||
| 8 | echo "Deactivating swap..." | ||
| 9 | swapoff -a | ||
| 10 | |||
| 11 | # We leave /proc mounted. | ||
| 12 | echo "Unmounting local filesystems..." | ||
| 13 | umount -f -a -r | ||
| 14 | |||
| 15 | mount -o remount,ro / | ||
| 16 | |||
| 17 | : exit 0 | ||
