]> pilppa.org Git - familiar-h63xx-build.git/blob - org.handhelds.familiar/packages/unionfs/unionroot_0.1.1.bb
OE tree imported from monotone branch org.openembedded.oz354fam083 at revision 8b12e3...
[familiar-h63xx-build.git] / org.handhelds.familiar / packages / unionfs / unionroot_0.1.1.bb
1 LICENSE = "GPL"
2
3 DESCRIPTION = "Provides an init script that changes the root file-system to unionfs."
4 DEPENDS = "busybox base-files"
5 RDEPENDS = "busybox base-files"
6 SECTION = "base"
7 PRIORITY = "optional"
8 MAINTAINER = "Chris Lord <cwiiis@handhelds.org>"
9
10 SRC_URI = "file://init.unionroot"
11
12 inherit update-alternatives
13
14 ALTERNATIVE_NAME = "init"
15 ALTERNATIVE_LINK = "/sbin/init"
16 ALTERNATIVE_PATH = "/sbin/init.unionroot"
17 ALTERNATIVE_PRIORITY = "100"
18
19 do_install () {
20         install -d ${D}${base_sbindir}
21         install -m 0755 ${WORKDIR}/init.unionroot ${D}${base_sbindir}/
22 }
23
24 pkg_postinst () {
25         # Alter /etc/fstab
26         mv $D/${sysconfdir}/fstab $D/${sysconfdir}/fstab.old
27         awk 'BEGIN { print "# Altered by unionroot" }
28                    { if ( $2 == "/" )
29                      {
30                         print $1 "\t/media/realroot\t" $3 "\t" $4 "\t" $5 "\t" $6
31                      }
32                      else
33                      {
34                         print $0
35                      }
36                    }' $D/${sysconfdir}/fstab.old > $D/${sysconfdir}/fstab
37 }
38