Permalink
Browse files

Update sys-init to get rid of some loader.conf.tmp errors from showin…

…g during install
  • Loading branch information...
1 parent 2ee61e0 commit ce67c5abebe901ed8aba0daeffef025acefb6a94 @kmoore134 kmoore134 committed Aug 12, 2013
Showing with 9 additions and 3 deletions.
  1. +9 −3 src-sh/xtrafiles/local/share/pcbsd/scripts/sys-init.sh
@@ -31,14 +31,20 @@ sh /usr/local/share/pcbsd/scripts/reset-firewall
/usr/local/bin/pc-extractoverlay ports
# Add our notice to top of loader.conf
-mv /boot/loader.conf /boot/loader.conf.tmp
+if [ -e "/boot/loader.conf" ] ; then
+ mv /boot/loader.conf /boot/loader.conf.tmp
+fi
+
cat <<EOF >/boot/loader.conf
# * IMPORTANT NOTICE *
# Run 'grub-mkconfig -o /boot/grub/grub.cfg' after making changes to this file
###############################################################################
EOF
-cat /boot/loader.conf.tmp >> /boot/loader.conf
-rm /boot/loader.conf.tmp
+
+if [ -e "/boot/loader.conf.tmp" ] ; then
+ cat /boot/loader.conf.tmp >> /boot/loader.conf
+ rm /boot/loader.conf.tmp
+fi
################################################
# Do desktop specific init

0 comments on commit ce67c5a

Please sign in to comment.