aboutsummaryrefslogtreecommitdiffstats
path: root/meta/recipes-core/util-linux/util-linux.inc
diff options
context:
space:
mode:
authorQing He <qing.he@intel.com>2011-01-21 17:54:22 +0800
committerSaul Wold <sgw@linux.intel.com>2011-01-24 14:09:12 -0800
commit8ee25e24622ac5eb9d204dfbf12a2e79fdac20c8 (patch)
tree48a44f260317aa7d23e631bb0882ad5bf9a65e56 /meta/recipes-core/util-linux/util-linux.inc
parent036e4a920fe1dd97c521eb44dcb50bf3df29e43b (diff)
downloadopenembedded-core-contrib-8ee25e24622ac5eb9d204dfbf12a2e79fdac20c8.tar.gz
openembedded-core-contrib-8ee25e24622ac5eb9d204dfbf12a2e79fdac20c8.tar.bz2
openembedded-core-contrib-8ee25e24622ac5eb9d204dfbf12a2e79fdac20c8.zip
util-linux: fix dangling symlinks
shutdown and swapon should be in $base_sbindir instead of $sbindir Signed-off-by: Qing He <qing.he@intel.com>
Diffstat (limited to 'meta/recipes-core/util-linux/util-linux.inc')
-rw-r--r--meta/recipes-core/util-linux/util-linux.inc18
1 files changed, 13 insertions, 5 deletions
diff --git a/meta/recipes-core/util-linux/util-linux.inc b/meta/recipes-core/util-linux/util-linux.inc
index 931a627b56..42881093fd 100644
--- a/meta/recipes-core/util-linux/util-linux.inc
+++ b/meta/recipes-core/util-linux/util-linux.inc
@@ -149,11 +149,19 @@ do_install () {
install -d ${D}${sysconfdir}/default/
echo 'MOUNTALL="-t nonfs,nosmbfs,noncpfs"' > ${D}${sysconfdir}/default/mountall
- ln -sf ${sbindir}/swapon ${D}${sbindir}/swapoff.${PN}
- ln -sf ${sbindir}/shutdown ${D}${sbindir}/reboot.${PN}
- ln -sf ${sbindir}/shutdown ${D}${sbindir}/halt.${PN}
- ln -sf ${sbindir}/shutdown ${D}${sbindir}/fastboot
- ln -sf ${sbindir}/shutdown ${D}${sbindir}/fasthalt
+ # note ${PN} in swapon.${PN}, swapon is an alternative link that is
+ # not guaranteed to provide multiple functions, similar for shutdown
+ ln -sf swapon.${PN} ${D}${base_sbindir}/swapoff.${PN}
+ ln -sf shutdown.${PN} ${D}${base_sbindir}/reboot.${PN}
+ ln -sf shutdown.${PN} ${D}${base_sbindir}/halt.${PN}
+ ln -sf shutdown.${PN} ${D}${base_sbindir}/fastboot
+ ln -sf shutdown.${PN} ${D}${base_sbindir}/fasthalt
+
+ rm -f ${D}${sbindir}/halt
+ rm -f ${D}${sbindir}/reboot
+ rm -f ${D}${sbindir}/fastboot
+ rm -f ${D}${sbindir}/fasthalt
+ rm -f ${D}${sbindir}/swapoff
}
pkg_postinst_${PN} () {