From 55b0fbdbd86876704e0a85b14ad40a572faf899d Mon Sep 17 00:00:00 2001 From: John Klug Date: Thu, 22 Aug 2019 14:41:56 -0500 Subject: Add mtadm to dialout in upgrade case, and create /run/radio in dialout group --- recipes-core/useradd/useradd.bb | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'recipes-core/useradd') diff --git a/recipes-core/useradd/useradd.bb b/recipes-core/useradd/useradd.bb index 9f7ef05..78fc981 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 = "r2" +PR = "r3" LICENSE = "MIT" LIC_FILES_CHKSUM = "file://${COREBASE}/LICENSE;md5=4d92cd373abda3937c2bc47fbc49d690 \ file://${COREBASE}/meta/COPYING.MIT;md5=3da9cfbcb788c80a0384361b4de20420" @@ -53,5 +53,11 @@ pkg_postinst_${PN} () { echo 'PATH='${Sub} >>/home/mtadm/.profile echo 'export PATH' >>/home/mtadm/.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 } -- cgit v1.2.3