From cb560a2d27a63190c83ac3329d50066fa754b5c7 Mon Sep 17 00:00:00 2001 From: John Klug Date: Tue, 6 Jun 2017 15:57:32 -0500 Subject: Add /sbin and usr/sbin to the mtadm PATH --- recipes-core/useradd/useradd.bb | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'recipes-core') diff --git a/recipes-core/useradd/useradd.bb b/recipes-core/useradd/useradd.bb index 0afa3b1..458facf 100644 --- a/recipes-core/useradd/useradd.bb +++ b/recipes-core/useradd/useradd.bb @@ -45,3 +45,13 @@ FILES_${PN} = "/home/mtadm/.ssh" # debugsources.list: No such file or directory: INHIBIT_PACKAGE_DEBUG_SPLIT = "1" +pkg_postinst_${PN} () { + profile=/home/mtadm/.profile + if ! grep 'sbin' ${profile} ; then + Sub='${PA' + Sub=${Sub}'TH}:/sbin:/usr/sbin' + echo 'PATH='${Sub} >>/home/mtadm/.profile + echo 'export PATH' >>/home/mtadm/.profile + fi +} + -- cgit v1.2.3