0f61248db0cb1f8cab6275c733450fb390b49139
[AGL/meta-agl.git] / meta-app-framework / recipes-config / agl-users / agl-users_0.1.bb
1 inherit allarch useradd
2
3 SUMMARY = "AGL Users Seed"
4 DESCRIPTION = "This is a core framework component that\
5  defines how users are managed and who are the default users."
6
7 LICENSE = "MIT"
8 LIC_FILES_CHKSUM = "file://${COREBASE}/meta/COPYING.MIT;md5=3da9cfbcb788c80a0384361b4de20420"
9
10
11 SRC_URI = ""
12
13
14 RDEPENDS_${PN}_append_smack = " smack-userspace"
15 DEPENDS_append_smack = " smack-userspace-native"
16
17 ALLOW_EMPTY_${PN} = "1"
18
19 USERADD_PACKAGES = "${PN}"
20
21 USERADD_PARAM_${PN} = "\
22   -g users -d /home/agl-driver -m -K PASS_MAX_DAYS=-1 agl-driver ; \
23   -g users -d /home/agl-passenger -m -K PASS_MAX_DAYS=-1 agl-passenger \
24 "
25
26
27 do_configure() {
28     :
29 }
30
31 do_compile() {
32     :
33 }
34
35 do_install() {
36     :
37 }
38
39
40 pkg_postinst_${PN}() {
41     #!/bin/sh -e
42
43     # avoid to run on host
44     [ x"$D" != "x" ] && exit 1
45
46     # Drops password
47     passwd -d agl-driver
48     passwd -d agl-passenger
49 }
50            
51 pkg_postinst_${PN}_smack() {
52     #!/bin/sh -e
53
54     # avoid to run on host
55     [ x"$D" != "x" ] && exit 1
56
57     # Actions to carry out on the device go here
58     for x in /etc/skel /home/*
59     do
60         chsmack -a User::Home $x
61     done
62     passwd -d agl-driver
63     passwd -d agl-passenger
64 }
65