summaryrefslogtreecommitdiffstats
path: root/meta/recipes-core/initscripts/initscripts-1.0/openmn/packages
diff options
context:
space:
mode:
Diffstat (limited to 'meta/recipes-core/initscripts/initscripts-1.0/openmn/packages')
-rwxr-xr-xmeta/recipes-core/initscripts/initscripts-1.0/openmn/packages63
1 files changed, 63 insertions, 0 deletions
diff --git a/meta/recipes-core/initscripts/initscripts-1.0/openmn/packages b/meta/recipes-core/initscripts/initscripts-1.0/openmn/packages
new file mode 100755
index 0000000000..2566487d2d
--- /dev/null
+++ b/meta/recipes-core/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
12reconfigure () {
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
45if 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
61fi
62
63test -f /usr/lib/ipkg/info/task-ramses || ipkg install task-ramses