if [ -n "${DNSDOMAIN}" ]
then
echo "domain ${DNSDOMAIN}" > /etc/resolv.conf
- echo "search ${DNSDOMAIN}" > /etc/resolv.conf
+ echo "search ${DNSDOMAIN}" >> /etc/resolv.conf
fi
for i in ${IPV4DNS0} ${IPV4DNS1} ${IPV4DNS1}
do
- echo "nameserver $i" >> /etc/resolv.conf
+ if [ -n "$i" ] && [ "$i" != 0.0.0.0 ]
+ then
+ echo "nameserver $i" >> /etc/resolv.conf
+ fi
done
fi
unionmountopts="${unionmountopts} ${unionrw}=RW:${unionro}=RO"
( sysctl -w fs.file-max=391524 ; ulimit -HSn 16384
unionfs-fuse ${unionmountopts} "${unionmountpoint}" ) && \
- ( mkdir -p /run/initramfs
- pidof unionfs-fuse >> /run/initramfs/sendsigs.omit || true )
+ ( mkdir -p /run/sendsigs.omit.d
+ pidof unionfs-fuse >> /run/sendsigs.omit.d/unionfs-fuse || true )
;;
unionmount)
log_end_msg
fi
+ if [ -f /etc/resolv.conf ] && [ ! -s ${rootmnt}/etc/resolv.conf ]
+ then
+ log_begin_msg "Copying /etc/resolv.conf to ${rootmnt}/etc/resolv.conf"
+ cp -v /etc/resolv.conf ${rootmnt}/etc/resolv.conf
+ log_end_msg
+ fi
+
maybe_break live-bottom
log_begin_msg "Running /scripts/live-bottom\n"