]> code.ossystems Code Review - openembedded-core.git/commitdiff
util-linux: fix dangling symlinks
authorQing He <qing.he@intel.com>
Fri, 21 Jan 2011 09:54:22 +0000 (17:54 +0800)
committerSaul Wold <sgw@linux.intel.com>
Mon, 24 Jan 2011 22:09:12 +0000 (14:09 -0800)
shutdown and swapon should be in $base_sbindir instead of $sbindir

Signed-off-by: Qing He <qing.he@intel.com>
meta/recipes-core/util-linux/util-linux.inc
meta/recipes-core/util-linux/util-linux_2.17.2.bb

index 931a627b5696bf5b9e67628435171a1894f6e3c3..42881093fdadefe594e334d35344639251f1694b 100644 (file)
@@ -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} () {
index 662bde0dfc71edb733b5b643f44a9addc700533b..d0b1b41ed461b6ee4895e058307538923bc68a76 100644 (file)
@@ -1,6 +1,6 @@
 MAJOR_VERSION = "2.17"
 require util-linux.inc
-PR = "r2"
+PR = "r3"
 
 SRC_URI += "file://uclibc-compile.patch \
                  file://util-linux-ng-replace-siginterrupt.patch"