pkgsrc-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[pkgsrc/trunk]: pkgsrc/sysutils/mklivecd/files * Check if the kernel is avail...
details: https://anonhg.NetBSD.org/pkgsrc/rev/c1e7136f2a52
branches: trunk
changeset: 527752:c1e7136f2a52
user: xtraeme <xtraeme%pkgsrc.org@localhost>
date: Thu Apr 12 22:26:19 2007 +0000
description:
* Check if the kernel is available in ~/.mklivecd before showing
informative messages.
* Remove unnecessary checks for USE_GNU_GRUB, now that some options
are checked to have correct values.
* Misc cleanups.
diffstat:
sysutils/mklivecd/files/mklivecd.sh | 41 ++++++++++++++++--------------------
1 files changed, 18 insertions(+), 23 deletions(-)
diffs (117 lines):
diff -r 2b28b153c1e3 -r c1e7136f2a52 sysutils/mklivecd/files/mklivecd.sh
--- a/sysutils/mklivecd/files/mklivecd.sh Thu Apr 12 22:10:43 2007 +0000
+++ b/sysutils/mklivecd/files/mklivecd.sh Thu Apr 12 22:26:19 2007 +0000
@@ -1,6 +1,6 @@
#!/bin/sh
#
-# $NetBSD: mklivecd.sh,v 1.39 2007/04/11 14:40:44 xtraeme Exp $
+# $NetBSD: mklivecd.sh,v 1.40 2007/04/12 22:26:19 xtraeme Exp $
#
# Copyright (c) 2004-2007 Juan Romero Pardines.
# All rights reserved.
@@ -346,7 +346,7 @@
echo "=> Not copying $f, already exists."
fi
done
- elif is_disabled USE_GNU_GRUB; then
+ else
#
# NetBSD cd9660 bootloader (bootxx_cd9660)
#
@@ -362,9 +362,6 @@
else
showmsg "Missing ${BOOT_IMG}... exiting."
fi
- else
- showmsg "Unknown value in USE_GNU_GRUB, use 'yes' or 'no'."
- bye 1
fi
}
@@ -457,13 +454,10 @@
_EOF_
fi
showmsgstring
- elif is_disabled_USE_GNU_GRUB; then
+ else
gzip $ISODIR/$bootkern
mv $ISODIR/k.$kernname.gz $ISODIR/k.$bootkern
showmsgstring
- else
- showmsg "Unknown value in USE_GNU_GRUB, use 'yes' or 'no'."
- bye 1
fi
else
showmsg "kernel compilation failed! ($kernname), exiting."
@@ -505,6 +499,16 @@
fi
if is_disabled MULTIPLE_KERNELS; then
+ #
+ # Use the specified kernel from ~/.mklivecd.
+ #
+ if [ -s $config_dir/$KERNEL_CONFIG ]; then
+ cp $config_dir/$KERNEL_CONFIG $WORKDIR
+ else
+ showmsg "couldn't find $KERNEL_CONFIG in $config_dir, exiting."
+ bye 1
+ fi
+
showmsg "Building kernel on $(date):"
if [ -n "$verbose_mode" ]; then
showmsg "kernel configuration: $KERNEL_CONFIG"
@@ -512,15 +516,6 @@
sleep 2
fi
echo
- #
- # Use the specified kernel from ~/.mklivecd.
- #
- if [ -s $config_dir/$KERNEL_CONFIG ]; then
- cp $config_dir/$KERNEL_CONFIG $WORKDIR
- else
- showmsg "couldn't find '$KERNEL_CONFIG' in $config_dir, exiting."
- bye 1
- fi
cd $WORKDIR
[ ! -d $WORKDIR/$KERNEL_NAME ] && mkdir $WORKDIR/$KERNEL_NAME
@@ -635,7 +630,7 @@
break
fi
done
- if [ "$DISABLE_X11" = "" ]; then
+ if [ -z $DISABLE_X11 ]; then
showmsg "Installing X11 sets:"
for X in ${X11_SETS}
do
@@ -677,7 +672,7 @@
cat > $ISODIR/etc/rc.d/root <<_EOF_
#!/bin/sh
#
-# \$NetBSD: mklivecd.sh,v 1.39 2007/04/11 14:40:44 xtraeme Exp $
+# \$NetBSD: mklivecd.sh,v 1.40 2007/04/12 22:26:19 xtraeme Exp $
#
# PROVIDE: root
@@ -1084,7 +1079,7 @@
checkconf()
{
- if [ -f $config_file ]; then
+ if [ -f "$config_file" ]; then
if [ $(id -u) -ne 0 ]; then
showmsg "You must be root, exiting."
bye 1
@@ -1138,9 +1133,9 @@
verbose_mode=
fi
-target=$1
+target="$1"
-case "$target" in
+case $target in
iso)
checkconf
do_cdlive iso
Home |
Main Index |
Thread Index |
Old Index