summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xscripts/build/lb_chroot_hacks16
1 files changed, 9 insertions, 7 deletions
diff --git a/scripts/build/lb_chroot_hacks b/scripts/build/lb_chroot_hacks
index 1356112d3..bdebc331e 100755
--- a/scripts/build/lb_chroot_hacks
+++ b/scripts/build/lb_chroot_hacks
@@ -151,14 +151,16 @@ case "${LB_BINARY_IMAGES}" in
then
mkdir chroot/etc/initramfs-tools
fi
- if [ ! "$(grep 'MODULES=netboot' chroot/etc/initramfs-tools/initramfs.conf)" ]
+
+ # Configuring initramfs for NFS
+ if ! grep -qs "BOOT=nfs" chroot/etc/initramfs-tools/initramfs.conf
+ then
+ echo "BOOT=nfs" >> chroot/etc/initramfs-tools/initramfs.conf
+ fi
+
+ if ! grep -qs "NFSROOT=auto" chroot/etc/initramfs-tools/initramfs.conf
then
- # Configuring initramfs for NFS
-cat >> chroot/etc/initramfs-tools/initramfs.conf << EOF
-MODULES=netboot
-BOOT=nfs
-NFSROOT=auto
-EOF
+ echo "NFSROOT=auto" >> chroot/etc/initramfs-tools/initramfs.conf
fi
;;
esac