From 796176d85006914b61ec98f5cd3025e376756ba7 Mon Sep 17 00:00:00 2001 From: Matthew Dillon Date: Wed, 8 Jun 2005 22:14:37 +0000 Subject: [PATCH] Handle the case where the version file might be empty, which can occur if a machine crashes while building the kernel. --- sys/conf/newvers.sh | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/sys/conf/newvers.sh b/sys/conf/newvers.sh index 39c02b3f38..39ea9b493c 100644 --- a/sys/conf/newvers.sh +++ b/sys/conf/newvers.sh @@ -33,7 +33,7 @@ # # @(#)newvers.sh 8.1 (Berkeley) 4/20/94 # $FreeBSD: src/sys/conf/newvers.sh,v 1.44.2.30 2003/04/04 07:02:46 murray Exp $ -# $DragonFly: src/sys/conf/newvers.sh,v 1.13 2005/05/09 17:24:14 dillon Exp $ +# $DragonFly: src/sys/conf/newvers.sh,v 1.14 2005/06/08 22:14:37 dillon Exp $ tag="\$Name: $" @@ -146,6 +146,9 @@ fi touch version v=`cat version` u=${USER-root} d=`pwd` h=`hostname` t=`date` +if [ "$v" = "" ]; then + v=1 +fi i=`make -V KERN_IDENT` cat << EOF > vers.c $COPYRIGHT -- 2.41.0