summaryrefslogtreecommitdiffstats
path: root/meta-skeleton/recipes-skeleton/useradd/useradd-example.bb
diff options
context:
space:
mode:
Diffstat (limited to 'meta-skeleton/recipes-skeleton/useradd/useradd-example.bb')
-rw-r--r--meta-skeleton/recipes-skeleton/useradd/useradd-example.bb17
1 files changed, 8 insertions, 9 deletions
diff --git a/meta-skeleton/recipes-skeleton/useradd/useradd-example.bb b/meta-skeleton/recipes-skeleton/useradd/useradd-example.bb
index 7c5b9d0503..8437a5a774 100644
--- a/meta-skeleton/recipes-skeleton/useradd/useradd-example.bb
+++ b/meta-skeleton/recipes-skeleton/useradd/useradd-example.bb
@@ -1,7 +1,6 @@
1SUMMARY = "Example recipe for using inherit useradd" 1SUMMARY = "Example recipe for using inherit useradd"
2DESCRIPTION = "This recipe serves as an example for using features from useradd.bbclass" 2DESCRIPTION = "This recipe serves as an example for using features from useradd.bbclass"
3SECTION = "examples" 3SECTION = "examples"
4PR = "r1"
5LICENSE = "MIT" 4LICENSE = "MIT"
6LIC_FILES_CHKSUM = "file://${COREBASE}/meta/COPYING.MIT;md5=3da9cfbcb788c80a0384361b4de20420" 5LIC_FILES_CHKSUM = "file://${COREBASE}/meta/COPYING.MIT;md5=3da9cfbcb788c80a0384361b4de20420"
7 6
@@ -30,19 +29,19 @@ USERADD_PACKAGES = "${PN} ${PN}-user3"
30# useradd command. Multiple users can be created by separating 29# useradd command. Multiple users can be created by separating
31# the commands with a semicolon. Here we'll create two users, 30# the commands with a semicolon. Here we'll create two users,
32# user1 and user2: 31# user1 and user2:
33USERADD_PARAM_${PN} = "-u 1200 -d /home/user1 -r -s /bin/bash user1; -u 1201 -d /home/user2 -r -s /bin/bash user2" 32USERADD_PARAM:${PN} = "-u 1200 -d /home/user1 -r -s /bin/bash user1; -u 1201 -d /home/user2 -r -s /bin/bash user2"
34 33
35# user3 will be managed in the useradd-example-user3 pacakge: 34# user3 will be managed in the useradd-example-user3 package:
36# As an example, we use the -P option to set clear text password for user3 35# As an example, we use the -p option to set password ('user3') for user3
37USERADD_PARAM_${PN}-user3 = "-u 1202 -d /home/user3 -r -s /bin/bash -P 'user3' user3" 36USERADD_PARAM:${PN}-user3 = "-u 1202 -d /home/user3 -r -s /bin/bash -p '\$6\$XAWr.8nc\$bUE4pYYaVb8n6BbnBitU0zeJMtfhTpFpiOBLL9zRl4e4YQo88UU4r/1kjRzmTimCy.BvDh4xoFwVqcO.pihLa1' user3"
38 37
39# GROUPADD_PARAM works the same way, which you set to the options 38# GROUPADD_PARAM works the same way, which you set to the options
40# you'd normally pass to the groupadd command. This will create 39# you'd normally pass to the groupadd command. This will create
41# groups group1 and group2: 40# groups group1 and group2:
42GROUPADD_PARAM_${PN} = "-g 880 group1; -g 890 group2" 41GROUPADD_PARAM:${PN} = "-g 880 group1; -g 890 group2"
43 42
44# Likewise, we'll manage group3 in the useradd-example-user3 package: 43# Likewise, we'll manage group3 in the useradd-example-user3 package:
45GROUPADD_PARAM_${PN}-user3 = "-g 900 group3" 44GROUPADD_PARAM:${PN}-user3 = "-g 900 group3"
46 45
47do_install () { 46do_install () {
48 install -d -m 755 ${D}${datadir}/user1 47 install -d -m 755 ${D}${datadir}/user1
@@ -69,8 +68,8 @@ do_install () {
69 chgrp -R group3 ${D}${datadir}/user3 68 chgrp -R group3 ${D}${datadir}/user3
70} 69}
71 70
72FILES_${PN} = "${datadir}/user1/* ${datadir}/user2/*" 71FILES:${PN} = "${datadir}/user1/* ${datadir}/user2/*"
73FILES_${PN}-user3 = "${datadir}/user3/*" 72FILES:${PN}-user3 = "${datadir}/user3/*"
74 73
75# Prevents do_package failures with: 74# Prevents do_package failures with:
76# debugsources.list: No such file or directory: 75# debugsources.list: No such file or directory: