Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 1 | SUMMARY = "New user to do specific job" |
| 2 | DESCRIPTION = "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" |
| 3 | SECTION = "x11" |
| 4 | PR = "r6" |
| 5 | LICENSE = "MIT" |
| 6 | LIC_FILES_CHKSUM = "file://builder_hob_start.sh;endline=5;md5=84796c3c41785d86100fdabcbdade00e" |
| 7 | |
| 8 | SRC_URI = "file://builder_hob_start.sh \ |
| 9 | file://please_wait_dialog.py \ |
| 10 | " |
| 11 | |
| 12 | S = "${WORKDIR}" |
| 13 | |
| 14 | RDEPENDS_${PN} = "mini-x-session" |
| 15 | |
| 16 | inherit useradd |
| 17 | |
| 18 | # builder user password is "builder" |
| 19 | BUILDER_PASSWORD ?= ".gLibiNXn0P12" |
| 20 | USERADD_PACKAGES = "${PN}" |
| 21 | USERADD_PARAM_${PN} = "--system --create-home \ |
| 22 | --groups video,tty,audio \ |
| 23 | --password ${BUILDER_PASSWORD} \ |
| 24 | --user-group builder" |
| 25 | |
| 26 | do_install () { |
| 27 | install -d -m 755 ${D}${sysconfdir}/mini_x/session.d |
| 28 | install -p -m 755 builder_hob_start.sh ${D}${sysconfdir}/mini_x/session.d/ |
| 29 | |
| 30 | chown builder.builder ${D}${sysconfdir}/mini_x/session.d/builder_hob_start.sh |
| 31 | install -p -m 755 please_wait_dialog.py ${D}${sysconfdir}/mini_x |
| 32 | } |
| 33 | |