surpport seeking the recorded video
[vuplus_openembedded] / recipes / 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
9 SRC_URI = "file://init.unionroot"
10
11 inherit update-alternatives
12
13 ALTERNATIVE_NAME = "init"
14 ALTERNATIVE_LINK = "/sbin/init"
15 ALTERNATIVE_PATH = "/sbin/init.unionroot"
16 ALTERNATIVE_PRIORITY = "100"
17
18 do_install () {
19         install -d ${D}${base_sbindir}
20         install -m 0755 ${WORKDIR}/init.unionroot ${D}${base_sbindir}/
21 }
22
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 == "/" )
28                      {
29                         print $1 "\t/media/realroot\t" $3 "\t" $4 "\t" $5 "\t" $6
30                      }
31                      else
32                      {
33                         print $0
34                      }
35                    }' $D/${sysconfdir}/fstab.old > $D/${sysconfdir}/fstab
36 }
37