CVS: brutus/iso/usr/sbin lunar.install,1.12,1.13
Terry Chan
tchan at lunar-linux.org
Wed Dec 10 16:34:36 GMT 2003
Update of /var/cvs/lunar/brutus/iso/usr/sbin
In directory dbguin.lunar-linux.org:/tmp/cvs-serv28354/usr/sbin
Modified Files:
lunar.install
Log Message:
Files used on the 20031210 iso and some more fixes for lunar.install.
Index: lunar.install
===================================================================
RCS file: /var/cvs/lunar/brutus/iso/usr/sbin/lunar.install,v
retrieving revision 1.12
retrieving revision 1.13
diff -u -d -r1.12 -r1.13
--- lunar.install 25 Aug 2003 03:44:41 -0000 1.12
+++ lunar.install 10 Dec 2003 16:34:34 -0000 1.13
@@ -1,49 +1,53 @@
-#!/bin/sh
-############################################################
-# Copyright 2001 by Kyle Sallee #
-############################################################
-# Sorcerer is a tedious menu driven process of #
-# installing the Sorcerer GNU Linux ISO #
-############################################################
+#!/bin/bash
+#############################################################
+# Copyright 2001 by Kyle Sallee #
+#############################################################
+# Sorcerer is a tedious menu driven process of #
+# installing the Sorcerer GNU Linux ISO #
+#############################################################
# Hacked by Kagan Kongar to fix it to fit Lunar Linux
# 20020320
# portions Copyright 2002 by Kagan Kongar
#
# this code is GPL'd
-############################################################
+#############################################################
# 20020425, the networking setup is heavily fixed to be in
# harmony with the new networking init, Kongar
-###########################################################
+#############################################################
# 20020425, rodzilla: added support for proxy servers, so
# Lunar can download source files on networks that force
# proxy use.
#
# proxy portions Copyright 2002 by rodzilla.
-###########################################################
+#############################################################
# 20020909, Terry Chan hacked lunar optimize and lnet
# into the installer menues so that those sections of the
# installer finally work DURING the install!
-###########################################################
+#############################################################
# 20030119, Terry Chan corrected some dates and email addr
-###########################################################
+#############################################################
# 20030210, Terry Chan added JFS to the install script
-###########################################################
+#############################################################
# 20030310, Terry Chan added code to make /etc writable for
# supporting niki's LVM install
-###########################################################
+#############################################################
# 20030413, Terry Chan commented out the code to make /etc
# writable for supporting niki's LVM install. Breaks too
# much code, especially unmounting
-###########################################################
+#############################################################
# 20030605, kc8apf added the alpha and ppc portions
-###########################################################
+#############################################################
# 20030729, tchan removed linux-testing and linux-vanilla
# kernels from the install menu. vanilla will be restored
# once the kernel version match the other lunar kernels again
#############################################################
-# 20030824. tchan added the dd command to zero out the MBR in
+# 20030824, tchan added the dd command to zero out the MBR in
# the inst_mbr function, per csm's request.
#############################################################
+# 20031210, tchan added vanilla kernel back to install menu.
+# Also added kernel modules to cdrom for test loading of
+# kernel modules straight from cdrom and not just initrd.
+#############################################################
introduction() {
@@ -87,7 +91,7 @@
chroot $TARGET mount -t devfs devfs /dev
chroot $TARGET mount -t tmpfs tmpfs /tmp
chroot $TARGET swapon -a
- chroot $TARGET lin $1
+ chroot $TARGET lin -r $1
chroot $TARGET swapoff -a
chroot $TARGET umount /tmp
chroot $TARGET umount /dev
@@ -126,6 +130,68 @@
}
+##########BEGIN KERNEL MODULE LOADING FUNCTIONS##########
+get_module_list() {
+
+ /bin/ls $1 |
+ /bin/sed "s/\.o//"
+
+}
+
+show_modules() {
+
+ for ITEM in `ls $MODULES_DIR/$1`; do
+ if [ -n "$1" ]; then /bin/echo $1/$ITEM
+ else /bin/echo $ITEM; fi
+ if [ -d $MODULES_DIR/$ITEM ]; then
+ /bin/echo "Directory"; else
+ /bin/echo "Module"
+ fi
+ done
+
+}
+
+input_module_parameters() {
+
+ HELP="Optionally, enter module parameters"
+
+ $DIALOG --nocancel \
+ --inputbox \
+ "$HELP" \
+ 0 0
+}
+
+load_module() {
+
+ KERNEL=`uname -r`
+ MODULES_DIR="/lib/modules/$KERNEL/kernel/drivers"
+ TITLE="Module Menu"
+ HELP="Select a module to load please"
+ MODULE=""
+
+ while
+
+ MODULES=`show_modules $MODULE` &&
+ MODULE=`$DIALOG --title "$TITLE" \
+ --menu \
+ "$HELP" \
+ 0 0 0 \
+ $MODULES` &&
+ [ -d $MODULES_DIR/$MODULE ]
+
+ do
+ true
+ done
+
+ if [ -f $MODULES_DIR/$MODULE ]; then
+ MODULE=`/bin/basename $MODULE | /bin/sed "s/\.o//"`
+ PARAMETERS=`input_module_parameters` &&
+ /sbin/modprobe $MODULE $PARAMETERS
+ /usr/bin/sleep 5
+ fi
+
+}
+##########END KERNEL MODULE LOADING FUNCTIONS##########
list_discs() {
@@ -696,9 +762,10 @@
LINUX_KERNEL="linux"
LINUX_KERNEL_PROMPT="Select your desired kernel module
Choices:
- linux (Lunar patchset by dem at lunar-linux.org)
+ linux (Lunar patchset by the lunar-devs)
linux-grsec (Most of lunar patchset + grsec)
- linux-stable (Linus tree + security patches only)"
+ linux-stable (Linus tree + security patches only)
+ linux-vanilla (Linus tree with NO patches)"
LINUX_KERNEL=`inputbox "$LINUX_KERNEL_PROMPT" $LINUX_KERNEL`
@@ -714,7 +781,7 @@
shell() {
echo "Press CTRL-D or type exit to return to the installer"
- /bin/sh
+ /bin/bash
}
@@ -1063,7 +1130,7 @@
B_HELP="Select default language, keymap, and console fonts"
C_HELP="Use fdisk or cfdisk to prepare hard drive partitions"
D_HELP="Mount and initialize file systems"
- E_HELP="Lunar requires 1GB of RAM + SWAP"
+ E_HELP="Lunar recommends twice the swap space of physical memory"
F_HELP="Copy the distro from CDROM to fixed disk"
G_HELP="Select timezone for translating GTM into local time"
H_HELP="Select architecture and optimizations"
@@ -1077,7 +1144,7 @@
N_HELP="Shell out for a moment"
O_HELP="Enable or disable guided menu"
P_HELP="Enable or disable asking of confirmation questions"
-
+ R_HELP="Select modules to load"
V_HELP="Guided menu disabled. Nothing will prevent you from choosing options in a nonsensical sequence. Good Luck."
W_HELP="Abort now if you have not made backups. Lunar Linux comes with absolutely no warranty. Run this script only when booted from the Lunar CD. Proceed at your own risk."
X_HELP="When ready you may transfer lunar from CD to fixed disk."
@@ -1110,7 +1177,8 @@
"M" "Done" "$M_HELP" \
"N" "Shell" "$N_HELP" \
"O" "Enable Guided Menu" "$O_HELP" \
- "P" "Toggle Confirm" "$P_HELP"`
+ "P" "Toggle Confirm" "$P_HELP" \
+ "R" "Load Kernel modules" "$R_HELP"`
;;
*)
ICOMMAND=`$DIALOG --title "$TITLE" \
@@ -1134,7 +1202,8 @@
"M" "Done" "$M_HELP" \
"N" "Shell" "$N_HELP" \
"O" "Enable Guided Menu" "$O_HELP" \
- "P" "Toggle Confirm" "$P_HELP"`
+ "P" "Toggle Confirm" "$P_HELP" \
+ "R" "Load Kernel modules" "$R_HELP"`
;;
esac
@@ -1153,7 +1222,8 @@
"D" "Mount Filesystems" "$D_HELP" \
"M" "Done" "$M_HELP" \
"N" "Shell" "$N_HELP" \
- "O" "Disable Guided Menu" "$O_HELP"`
+ "O" "Disable Guided Menu" "$O_HELP" \
+ "R" "Load Kernel modules" "$R_HELP"`
elif [ -z "$DONE_COPIED" ]; then
@@ -1241,6 +1311,7 @@
N) shell ;;
O) toggle_guide ;;
P) toggle_confirm ;;
+ R) load_module ;;
esac
done
@@ -1279,7 +1350,7 @@
"
DIALOG="dialog
--backtitle
-Lunar Linux Installer 20030413
+Lunar Linux Installer 20031210
--stdout"
ARCH=`arch`
More information about the Lunar-commits
mailing list