diff options
-rw-r--r-- | recipes/util-linux-ng/util-linux-ng.inc | 76 |
1 files changed, 43 insertions, 33 deletions
diff --git a/recipes/util-linux-ng/util-linux-ng.inc b/recipes/util-linux-ng/util-linux-ng.inc index 7e949d1615..8b526efd95 100644 --- a/recipes/util-linux-ng/util-linux-ng.inc +++ b/recipes/util-linux-ng/util-linux-ng.inc @@ -83,39 +83,49 @@ do_install () { oe_runmake ARCH=${TARGET_ARCH} CPU= CPUOPT= \ 'OPT=${CFLAGS}' 'CC=${CC}' 'LD=${LD}' \ 'LDFLAGS=${LDFLAGS}' 'DESTDIR=${D}' install - mkdir ${D}${base_bindir} - mkdir ${D}${base_sbindir} - test -f ${D}${sbindir}/pivot_root && \ - mv ${D}${sbindir}/pivot_root ${D}${base_sbindir}/pivot_root.${PN} - mv ${D}${bindir}/dmesg ${D}${base_bindir}/dmesg.${PN} - mv ${D}${bindir}/kill ${D}${base_bindir}/kill.${PN} - mv ${D}${bindir}/more ${D}${base_bindir}/more.${PN} - mv ${D}${sbindir}/hwclock ${D}${base_sbindir}/hwclock.${PN} - mv ${D}${sbindir}/mkswap ${D}${base_sbindir}/mkswap.${PN} - mv ${D}${sbindir}/shutdown ${D}${base_sbindir}/shutdown.${PN} -# mv ${D}${sbindir}/sln ${D}${base_sbindir}/sln.${PN} - mv ${D}${sbindir}/mkfs.minix ${D}${base_sbindir}/mkfs.minix.${PN} - mv ${D}${sbindir}/fsck.minix ${D}${base_sbindir}/fsck.minix.${PN} - mv ${D}${bindir}/hexdump ${D}${bindir}/hexdump.${PN} - mv ${D}${bindir}/last ${D}${bindir}/last.${PN} - mv ${D}${bindir}/logger ${D}${bindir}/logger.${PN} - mv ${D}${bindir}/mesg ${D}${bindir}/mesg.${PN} - mv ${D}${bindir}/renice ${D}${bindir}/renice.${PN} - mv ${D}${bindir}/wall ${D}${bindir}/wall.${PN} - - mv ${D}${sbindir}/losetup ${D}${base_sbindir}/losetup.${PN} - mv ${D}${sbindir}/swapon ${D}${base_sbindir}/swapon.${PN} - mv ${D}${bindir}/umount ${D}${base_bindir}/umount.${PN} - mv ${D}${bindir}/mount ${D}${base_bindir}/mount.${PN} - mv ${D}${sbindir}/fdisk ${D}${base_sbindir}/fdisk.${PN} - - mv ${D}${sbindir}/agetty ${D}${base_sbindir}/ - mv ${D}${sbindir}/blockdev ${D}${base_sbindir}/ - mv ${D}${sbindir}/cfdisk ${D}${base_sbindir}/ - mv ${D}${sbindir}/ctrlaltdel ${D}${base_sbindir}/ - - mv ${D}${sbindir}/readprofile ${D}${sbindir}/readprofile.${PN} - + mkdir -p ${D}${base_bindir} + + sbinprogs="agetty blockdev ctrlaltdel cfdisk" + sbinprogs_a="pivot_root hwclock mkswap shutdown mkfs.minix fsck.minix losetup swapon fdisk readprofile" + usrbinprogs_a="hexdump last logger mesg renice wall" + binprogs_a="dmesg kill more umount mount" + + if [ "${base_sbindir}" != "${sbindir}" ]; then + mkdir -p ${D}${base_sbindir} + for p in $sbinprogs $sbinprogs_a; do + if [ -f "${D}${sbindir}/$p" ]; then + mv "${D}${sbindir}/$p" "${D}${base_sbindir}/$p" + fi + done + fi + + if [ "${base_bindir}" != "${bindir}" ]; then + mkdir -p ${D}${base_bindir} + for p in $binprogs_a; do + if [ -f "${D}${bindir}/$p" ]; then + mv "${D}${bindir}/$p" "${D}${base_bindir}/$p" + fi + done + fi + + for p in $usrbinprogs_a; do + if [ -f "${D}${bindir}/$p" ]; then + mv "${D}${bindir}/$p" "${D}${bindir}/$p.${PN}" + fi + done + + for p in $binprogs_a; do + if [ -f "${D}${base_bindir}/$p" ]; then + mv "${D}${base_bindir}/$p" "${D}${base_bindir}/$p.${PN}" + fi + done + + for p in $sbinprogs_a; do + if [ -f "${D}${base_sbindir}/$p" ]; then + mv "${D}${base_sbindir}/$p" "${D}${base_sbindir}/$p.${PN}" + fi + done + install -d ${D}${sysconfdir}/default/ echo 'MOUNTALL="-t nonfs,nosmbfs,noncpfs"' > ${D}${sysconfdir}/default/mountall |