diff options
author | Mykyta Dorokhin <mykyta.dorokhin@globallogic.com> | 2020-02-19 15:40:44 +0200 |
---|---|---|
committer | Serhii Kostiuk <serhii.o.kostiuk@globallogic.com> | 2020-05-21 10:40:11 +0300 |
commit | 19ca401463153a7694a320f543852412d74cbd8f (patch) | |
tree | e3720d485786f1f2fc78c909fc2ad2f97829ab8d /recipes-core/useradd | |
parent | ed016261befcdc421ae1ac5d28d21066b56f42f2 (diff) | |
parent | 92cbb8fb30c624d3be98d6408d6ff7f03264a2c9 (diff) | |
download | meta-mlinux-19ca401463153a7694a320f543852412d74cbd8f.tar.gz meta-mlinux-19ca401463153a7694a320f543852412d74cbd8f.tar.bz2 meta-mlinux-19ca401463153a7694a320f543852412d74cbd8f.zip |
mpower-dev-thud: merge meta-mlinux:master (92cbb8fb Feb 11 2020) to meta-mlinux:multiarch5-thud (ed01626 Feb 3 2020)
Diffstat (limited to 'recipes-core/useradd')
-rw-r--r-- | recipes-core/useradd/useradd.bb | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/recipes-core/useradd/useradd.bb b/recipes-core/useradd/useradd.bb index 7a026e3..29d6508 100644 --- a/recipes-core/useradd/useradd.bb +++ b/recipes-core/useradd/useradd.bb @@ -1,7 +1,7 @@ SUMMARY = "Add mtadm user" DESCRIPTION = "Add mtadm user for security purposes" SECTION = "mtadm" -PR = "r1" +PR = "r4" LICENSE = "MIT" LIC_FILES_CHKSUM = "file://${COREBASE}/LICENSE;md5=4d92cd373abda3937c2bc47fbc49d690 \ file://${COREBASE}/meta/COPYING.MIT;md5=3da9cfbcb788c80a0384361b4de20420" @@ -30,7 +30,7 @@ GROUPADD_PARAM_${PN} = "-r -g 27 sudo" # useradd command. Multiple users can be created by separating # the commands with a semicolon. Here we'll create two users, # user1 and user2: -USERADD_PARAM_${PN} = "-u 50 -G sudo,disk -m -r -s /bin/bash ${user}" +USERADD_PARAM_${PN} = "-u 50 -G sudo,disk,dialout -m -r -s /bin/bash ${user}" do_install () { # If the recipe doesn't have a file, the ipk @@ -41,8 +41,6 @@ do_install () { chown mtadm:mtadm ${D}/${FILES_${PN}} } - - # Prevents do_package failures with: # debugsources.list: No such file or directory: INHIBIT_PACKAGE_DEBUG_SPLIT = "1" @@ -55,5 +53,11 @@ pkg_postinst_${PN} () { echo 'PATH='${Sub} >>$D/${home}/.profile echo 'export PATH' >>$D/${home}/.profile fi + # If doing an update, we need to add mtadm to dialout. + # If the admin has been changed, then the user must + # do something himself. + if [[ -z $D ]] ; then + sudo groupmems -a mtadm -g dialout || true + fi } |