summaryrefslogtreecommitdiff
path: root/recipes-core
diff options
context:
space:
mode:
authorJohn Klug <john.klug@multitech.com>2019-08-22 14:41:56 -0500
committerJohn Klug <john.klug@multitech.com>2019-08-22 14:41:56 -0500
commit55b0fbdbd86876704e0a85b14ad40a572faf899d (patch)
treed2149ed5507759543456f954606dde22e0167a0c /recipes-core
parent04b226b7f6be2735d9dbae12b39d68b84c69f20a (diff)
downloadmeta-mlinux-55b0fbdbd86876704e0a85b14ad40a572faf899d.tar.gz
meta-mlinux-55b0fbdbd86876704e0a85b14ad40a572faf899d.tar.bz2
meta-mlinux-55b0fbdbd86876704e0a85b14ad40a572faf899d.zip
Add mtadm to dialout in upgrade case, and create /run/radio in dialout group
Diffstat (limited to 'recipes-core')
-rw-r--r--recipes-core/multitech/config_2.3.bb6
-rw-r--r--recipes-core/useradd/useradd.bb8
2 files changed, 12 insertions, 2 deletions
diff --git a/recipes-core/multitech/config_2.3.bb b/recipes-core/multitech/config_2.3.bb
index 784b55e..0cbae96 100644
--- a/recipes-core/multitech/config_2.3.bb
+++ b/recipes-core/multitech/config_2.3.bb
@@ -4,7 +4,7 @@ LICENSE = "MIT"
RDEPENDS_${PN} += "bash"
LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/MIT;md5=0835ade698e0bcf8506ecda2f7b4f302"
PACKAGE_ARCH = "all"
-PR = "r3"
+PR = "r4"
PACKAGES =+ "${PN}-mths"
inherit update-rc.d
@@ -21,6 +21,7 @@ SRC_URI = "\
file://config-mths \
file://chat_wrapper \
file://chat_wrapper.default \
+ file://99_radio \
"
RDEPENDS_${PN}-mths += "${PN}"
@@ -53,13 +54,16 @@ fakeroot do_install () {
install -m 0644 ${WORKDIR}/defaults-mths.tar.gz ${D}${sysconfdir}/defaults-mths.tar.gz
install -d ${D}${sysconfdir}/default
+ install -d ${D}${sysconfdir}/default/volatiles
install -d ${D}${libexecdir}/ppp
install -m 0755 ${WORKDIR}/chat_wrapper ${D}${libexecdir}/ppp/
install -m 0644 ${WORKDIR}/chat_wrapper.default ${D}${sysconfdir}/default/chat_wrapper
+ install -m 0644 ${WORKDIR}/99_radio ${D}${sysconfdir}/default/volatiles
}
FILES_${PN} = "${sysconfdir}/defaults.tar.gz ${sysconfdir}/default_pass"
FILES_${PN} += "${sysconfdir}/init.d/config ${sysconfdir}/default ${libexecdir}/ppp/chat_wrapper"
+FILES_${PN} += "${sysconfdir}/default/volatiles"
FILES_${PN}-mths = "${sysconfdir}/defaults-mths.tar.gz"
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
}