blob: 0a64c31ab3c9a0002b87a6daebeb544b60cdb44f [file] [log] [blame]
Patrick Williamsc124f4f2015-09-15 14:41:29 -05001SUMMARY = "New user to do specific job"
2DESCRIPTION = "This recipe create a new user named ${PN}, who is used for specific jobs like building. The task can be auto started via mini X"
3SECTION = "x11"
4PR = "r6"
5LICENSE = "MIT"
Patrick Williamsd8c66bc2016-06-20 12:57:21 -05006LIC_FILES_CHKSUM = "file://builder_session.sh;endline=5;md5=84796c3c41785d86100fdabcbdade00e"
Patrick Williamsc124f4f2015-09-15 14:41:29 -05007
Patrick Williamsd8c66bc2016-06-20 12:57:21 -05008SRC_URI = "file://builder_session.sh \
Patrick Williamsc124f4f2015-09-15 14:41:29 -05009 "
10
11S = "${WORKDIR}"
12
13RDEPENDS_${PN} = "mini-x-session"
14
15inherit useradd
16
17# builder user password is "builder"
18BUILDER_PASSWORD ?= ".gLibiNXn0P12"
19USERADD_PACKAGES = "${PN}"
20USERADD_PARAM_${PN} = "--system --create-home \
21 --groups video,tty,audio \
22 --password ${BUILDER_PASSWORD} \
23 --user-group builder"
24
25do_install () {
26 install -d -m 755 ${D}${sysconfdir}/mini_x/session.d
Patrick Williamsd8c66bc2016-06-20 12:57:21 -050027 install -p -m 755 builder_session.sh ${D}${sysconfdir}/mini_x/session.d/
Patrick Williamsc124f4f2015-09-15 14:41:29 -050028
Patrick Williamsd8c66bc2016-06-20 12:57:21 -050029 chown builder.builder ${D}${sysconfdir}/mini_x/session.d/builder_session.sh
Patrick Williamsc124f4f2015-09-15 14:41:29 -050030}
31