[debian-knoppix] Suggestion: make knoppix-autoconfig fully configurable via files
Hi,
/etc/init.d/knoppix-autoconfig seems to be _almost_ but not completely
suitable for driving a HD-installed OS, that is, by only changing
configuration files (I think the configuration "by kernel command
line" is not really suitable for HD-installation/custom kernels).
I'm not sure whether this is intentional -- if this file is replaced
during any sort of "recommended" HD-install of Knoppix, please tell me
with what file(s)..
With the appended patch, for a HD-install all one has to do is copy
/KNOPPIX to the target root, create /etc/fstab and then append a few
lines to /etc/default/rcS, like:
# for knoppix-autoconfig
BOOT_utc=yes
BOOT_nodhcp=yes
BOOT_nomkxf86config=yes
BOOT_norebuildfstab=yes
Regards,
Wolfram.
--- knoppix-autoconfig.orig Mon Jan 5 07:09:50 2004
+++ knoppix-autoconfig Tue Feb 17 15:40:18 2004
@@ -11,6 +12,9 @@
# Ignore these signals: INT, TERM, SEGV
trap "" 2 3 11
+# load boot parameters from disk
+. /etc/default/rcS
+
# ANSI COLORS
CRE="
[K"
NORMAL="[0;39m"
@@ -54,6 +58,8 @@
# Check boot commandline for specified option
checkbootparam(){
+boot_par_="BOOT_$1"
+[ x${!boot_par_} = xyes ] && return 0
stringinstring " $1" "$CMDLINE"
return "$?"
}
@@ -411,7 +417,7 @@
[ -e /KNOPPIX/bin/ash ] || INSTALLED="yes"
# Set hostname
-hostname Knoppix
+hostname "$(cat /etc/hostname)"
# Set clock (Local time is more often used than GMT, so it is default)
UTC=""
@@ -447,7 +453,10 @@
KTZ="$(getbootparam tz 2>/dev/null)"
[ -f "/usr/share/zoneinfo/$KTZ" ] && TZ="$KTZ"
-cp "/usr/share/zoneinfo/$TZ" /etc/localtime
+if ! cmp "/usr/share/zoneinfo/$TZ" /etc/localtime; then
+ rm -f /etc/localtime
+ ln -s "/usr/share/zoneinfo/$TZ" /etc/localtime
+fi
# Delete obsolete links and files before starting autoconfig
if ! checkbootparam "nohwsetup"; then
@@ -794,6 +803,7 @@
#done
#fi
+if ! checkbootparam norebuildfstab; then
# Start creating /etc/fstab with HD partitions and USB SCSI devices now
echo -n "${BLUE}Scanning for Harddisk partitions and creating ${YELLOW}/etc/fstab${BLUE}... "
rebuildfstab -r -u knoppix -g knoppix >/dev/null 2>&1
@@ -802,6 +812,7 @@
sleep 8
fi
echo "${GREEN}Done.${NORMAL}"
+fi
if [ -n "$partitions" ]; then
while read p m f relax; do
_______________________________________________
debian-knoppix mailing list
debian-knoppix@linuxtag.org
http://mailman.linuxtag.org/mailman/listinfo/debian-knoppix
Reply to: