]> pilppa.org Git - familiar-h63xx-build.git/blob - org.handhelds.familiar/packages/unionfs/unionroot-utils_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-utils_0.1.1.bb
1 LICENSE = "GPL"
2
3 DESCRIPTION = "Tools for administering a system that utilises unionroot."
4 DEPENDS = "ipkg-collateral unionroot busybox"
5 RDEPENDS = "ipkg-collateral unionroot busybox"
6 SECTION = "base"
7 PRIORITY = "optional"
8 MAINTAINER = "Chris Lord <cwiiis@handhelds.org>"
9
10 PR = "2"
11
12 SRC_URI = "file://mount.unionroot \
13            file://umount.unionroot"
14
15 do_install () {
16         install -d ${D}${base_bindir}
17         install -m 0755 ${WORKDIR}/mount.unionroot ${D}${base_bindir}/
18         install -m 0755 ${WORKDIR}/umount.unionroot ${D}${base_bindir}/
19 }
20
21 pkg_postinst () {
22         update-alternatives --install /bin/mount mount /bin/mount.unionroot 100
23         update-alternatives --install /bin/umount umount /bin/umount.unionroot 100
24
25         # Alter /etc/ipkg.conf
26         mv $D/${sysconfdir}/ipkg.conf $D/${sysconfdir}/ipkg.conf.old
27         awk 'BEGIN { print "# Altered by unionroot" }
28                    { if ( $3 == "/" )
29                      {
30                         print $1 " " $2 " /media/realroot"
31                      }
32                      else
33                      {
34                         print $0
35                      }
36                    }' $D/${sysconfdir}/ipkg.conf.old > $D/${sysconfdir}/ipkg.conf
37 }
38
39 pkg_prerm () {
40         update-alternatives --remove mount /bin/mount.unionroot
41         update-alternatives --remove umount /bin/umount.unionroot
42 }
43