tinylogin: create script wrappers for selinux

Symlink can not execute will security contexts, so create script
wrappers for tinylogin commands instead of symlinks.

Also add tinylogin's login command as a alternative.

Signed-off-by: Xin Ouyang <Xin.Ouyang@windriver.com>
This commit is contained in:
Xin Ouyang 2012-09-11 16:30:01 +08:00
parent a11a0f7d08
commit c8b060cb5d

View File

@ -0,0 +1,14 @@
PR .= ".2"
do_install () {
install -d ${D}${base_bindir}
install -m 4755 tinylogin ${D}${base_bindir}/tinylogin
echo '#!'"${base_bindir}/tinylogin" > tinylogin_wrapper
for i in `cat tinylogin.links`; do
mkdir -p ${D}/`dirname $i`
install -m 755 tinylogin_wrapper ${D}$i
done
}
ALTERNATIVE_${PN} += "login"
ALTERNATIVE_LINK_NAME[login] = "${base_bindir}/login"