summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKoen Kooi <koen@openembedded.org>2008-12-03 17:24:31 +0100
committerKoen Kooi <koen@openembedded.org>2008-12-03 17:24:31 +0100
commitb67b6a1938a059b615a1b5ac7062e855fb25e1d2 (patch)
tree656673e17013959d0cfbf8953ce91a5f0a29ebb5
parentc53306f3e11d462a44196a4d58539ce0690f499c (diff)
tinylogin: move u-a prio above busybox so 'su' works again, also remove links on removal
-rw-r--r--packages/tinylogin/tinylogin_1.4.bb18
1 files changed, 16 insertions, 2 deletions
diff --git a/packages/tinylogin/tinylogin_1.4.bb b/packages/tinylogin/tinylogin_1.4.bb
index 43a7f10755..3feb4d8c69 100644
--- a/packages/tinylogin/tinylogin_1.4.bb
+++ b/packages/tinylogin/tinylogin_1.4.bb
@@ -5,7 +5,7 @@ changing passwords, and otherwise maintaining users \
and groups on an embedded system."
HOMEPAGE = "http://tinylogin.tinylogin.net/"
LICENSE = "GPL"
-PR = "r5"
+PR = "r6"
SRC_URI = "http://tinylogin.tinylogin.net/downloads/tinylogin-${PV}.tar.bz2 \
file://cvs-20040608.patch;patch=1;pnum=1 \
@@ -33,6 +33,20 @@ pkg_postinst_${PN} () {
if test "x$D" = "x"; then while read link; do if test ! -h "$link"; then case "$link" in /*/*/*) to="../../bin/tinylogin";; /bin/*) to="tinylogin";; /*/*) to="../bin/tinylogin";; esac; ln -s $to $link; fi; done </etc/tinylogin.links; fi
# This adds the links, remember that this has to work when building an image too, hence the $D
- while read link; do case "$link" in /*/*/*) to="../../bin/tinylogin";; /bin/*) to="tinylogin";; /*/*) to="../bin/tinylogin";; esac; bn=`basename $link`; update-alternatives --install $link $bn $to 40; done <$D/etc/tinylogin.links
+ while read link; do case "$link" in /*/*/*) to="../../bin/tinylogin";; /bin/*) to="tinylogin";; /*/*) to="../bin/tinylogin";; esac; bn=`basename $link`; update-alternatives --install $link $bn $to 60; done <$D/etc/tinylogin.links
+}
+
+
+pkg_prerm_${PN} () {
+ while read link
+ do
+ case "$link" in
+ /*/*/*) to="../../bin/tinylogin";;
+ /bin/*) to="tinylogin";;
+ /*/*) to="../bin/tinylogin";;
+ esac
+ bn=`basename $link`
+ sh /usr/bin/update-alternatives --remove $bn $to
+ done < /etc/tinylogin.links
}