summaryrefslogtreecommitdiffstats
path: root/meta/recipes-extended/shadow/shadow.inc
diff options
context:
space:
mode:
Diffstat (limited to 'meta/recipes-extended/shadow/shadow.inc')
-rw-r--r--meta/recipes-extended/shadow/shadow.inc7
1 files changed, 6 insertions, 1 deletions
diff --git a/meta/recipes-extended/shadow/shadow.inc b/meta/recipes-extended/shadow/shadow.inc
index 14c7281f53..81924e27b7 100644
--- a/meta/recipes-extended/shadow/shadow.inc
+++ b/meta/recipes-extended/shadow/shadow.inc
@@ -146,18 +146,23 @@ do_install_append() {
# Handle link properly after rename, otherwise missing files would
# lead rpm failed dependencies.
ln -sf newgrp.${BPN} ${D}${bindir}/sg
+
+ # mv nologin to nologin.${BPN}
+ mv ${D}${base_sbindir}/nologin ${D}${base_sbindir}/nologin.${BPN}
}
inherit update-alternatives
ALTERNATIVE_PRIORITY = "200"
-ALTERNATIVE_${PN} = "passwd chfn newgrp chsh groups chpasswd login vipw vigr su"
+ALTERNATIVE_${PN} = "passwd chfn newgrp chsh groups chpasswd login vipw vigr su nologin"
ALTERNATIVE_LINK_NAME[chpasswd] = "${sbindir}/chpasswd"
ALTERNATIVE_LINK_NAME[login] = "${base_bindir}/login"
ALTERNATIVE_LINK_NAME[vipw] = "${base_sbindir}/vipw"
ALTERNATIVE_LINK_NAME[vigr] = "${base_sbindir}/vigr"
ALTERNATIVE_LINK_NAME[su] = "${base_bindir}/su"
+ALTERNATIVE_LINK_NAME[nologin] = "${sbindir}/nologin"
+ALTERNATIVE_TARGET[nologin] = "${base_sbindir}/nologin.${BPN}"
ALTERNATIVE_${PN}-doc = "passwd.5 getspnam.3"
ALTERNATIVE_LINK_NAME[passwd.5] = "${mandir}/man5/passwd.5"