python-pyrex: Rework DEPENDS updates
[openembedded.git] / recipes / unionfs / unionroot_0.1.1.bb
blob5d404e36b621ad3e86c0ef68765dc001781832b0
1 LICENSE = "GPL"
3 DESCRIPTION = "Provides an init script that changes the root file-system to unionfs."
4 DEPENDS = "busybox base-files"
5 RDEPENDS_${PN} = "busybox base-files"
6 SECTION = "base"
7 PRIORITY = "optional"
9 SRC_URI = "file://init.unionroot"
11 inherit update-alternatives
13 ALTERNATIVE_NAME = "init"
14 ALTERNATIVE_LINK = "/sbin/init"
15 ALTERNATIVE_PATH = "/sbin/init.unionroot"
16 ALTERNATIVE_PRIORITY = "100"
18 do_install () {
19 install -d ${D}${base_sbindir}
20 install -m 0755 ${WORKDIR}/init.unionroot ${D}${base_sbindir}/
23 pkg_postinst () {
24 # Alter /etc/fstab
25 mv $D/${sysconfdir}/fstab $D/${sysconfdir}/fstab.old
26 awk 'BEGIN { print "# Altered by unionroot" }
27 { if ( $2 == "/" )
29 print $1 "\t/media/realroot\t" $3 "\t" $4 "\t" $5 "\t" $6
31 else
33 print $0
35 }' $D/${sysconfdir}/fstab.old > $D/${sysconfdir}/fstab