[Midnightbsd-cvs] CVS Commit: firstboot: New version creates a receipt instead of

laffer1 at midnightbsd.org laffer1 at midnightbsd.org
Sun Aug 5 20:46:07 EDT 2007


Log Message:
-----------
New version creates a receipt instead of removing one.  This is much easier to check for and handles the problem of mergemaster adding a new file, etc.

Modified Files:
--------------
    src/etc/rc.d:
        firstboot (r1.1 -> r1.2)

-------------- next part --------------
Index: firstboot
===================================================================
RCS file: /home/cvs/src/etc/rc.d/firstboot,v
retrieving revision 1.1
retrieving revision 1.2
diff -Letc/rc.d/firstboot -Letc/rc.d/firstboot -u -r1.1 -r1.2
--- etc/rc.d/firstboot
+++ etc/rc.d/firstboot
@@ -11,19 +11,20 @@
 name="firstboot"
 rcvar=
 start_cmd="firstboot_start"
-required_files="/etc/reconfig"
 
 firstboot_start()
 {
 	local lsuffix
 	local red
 	local yellow
+	local receipt
 
 	lsuffix="\e[0m"
 	red="\e[1;31;40m"
 	yellow="\e[1;33;40m"
+	receipt="/etc/fbreceipt"
 
-	if [ -f /etc/reconfig ]; then
+	if [ ! -f ${receipt} ]; then
 		echo -e "\r${red}MidnightBSD FirstBoot Configuration${lsuffix}"
 
 		echo "This utility requires an active Internet connection."
@@ -37,9 +38,9 @@
 			/usr/sbin/pkg_add -r windowmaker
 			echo -e "\r${yellow}Done.${lsuffix}"
 		else
-			echo "To run this utility again, touch /etc/reconfig and restart."
+			echo "To run this utility again, rm ${receipt} and restart."
 		fi
-		rm -f /etc/reconfig
+		touch ${receipt}
 	fi
 }
 


More information about the Midnightbsd-cvs mailing list