From 0b0768cc43b5a2107b5faa1902e1a7c572fb42d8 Mon Sep 17 00:00:00 2001 From: Robert Nelson Date: Fri, 25 Jul 2014 18:31:18 -0500 Subject: [PATCH] mk_mmc.sh: cleanup some of the errors msgs Signed-off-by: Robert Nelson --- mk_mmc.sh | 19 +++++++++++++++---- 1 file changed, 15 insertions(+), 4 deletions(-) diff --git a/mk_mmc.sh b/mk_mmc.sh index 94b115e..d596147 100755 --- a/mk_mmc.sh +++ b/mk_mmc.sh @@ -807,14 +807,25 @@ neuter_flash_kernel () { apt-install linux-base initramfs-tools || true apt-install flash-kernel || true - rm /target/usr/share/flash-kernel/db/all.db || true + if [ -f /target/usr/share/flash-kernel/db/all.db ] ; then + rm /target/usr/share/flash-kernel/db/all.db || true + fi + mkdir -p /target/usr/share/flash-kernel/db/ || true cp /etc/all.db /target/usr/share/flash-kernel/db/rcn-ee.db touch /target/usr/share/flash-kernel/rcn-ee.conf - rm /target/etc/initramfs/post-update.d/flash-kernel || true - rm /target/etc/kernel/postinst.d/zz-flash-kernel || true - rm /target/etc/kernel/postrm.d/zz-flash-kernel || true + if [ -f /target/etc/initramfs/post-update.d/flash-kernel ] ; then + rm /target/etc/initramfs/post-update.d/flash-kernel || true + fi + + if [ -f /target/etc/kernel/postinst.d/zz-flash-kernel ] ; then + rm /target/etc/kernel/postinst.d/zz-flash-kernel || true + fi + + if [ -f /target/etc/kernel/postrm.d/zz-flash-kernel ] ; then + rm /target/etc/kernel/postrm.d/zz-flash-kernel || true + fi mkdir -p /target/etc/dpkg/dpkg.cfg.d/ || true echo "# neuter flash-kernel" > /target/etc/dpkg/dpkg.cfg.d/01_noflash_kernel