mirror of
https://gitlab.archlinux.org/tpowa/archboot.git
synced 2024-09-19 11:30:37 +02:00
'changed network interfaces, fixed typos'
This commit is contained in:
parent
c4d1151b54
commit
f0201f80cb
1 changed files with 18 additions and 39 deletions
|
@ -553,10 +553,8 @@ mountpoints() {
|
|||
: >/tmp/.fstab
|
||||
: >/tmp/.parts
|
||||
|
||||
# Determine which filesystems are available
|
||||
insmod /lib/modules/$(uname -r)/kernel/fs/xfs/xfs.ko >/dev/null 2>&1
|
||||
insmod /lib/modules/$(uname -r)/kernel/fs/jfs/jfs.ko >/dev/null 2>&1
|
||||
FSOPTS="ext2 Ext2 ext3 Ext3"
|
||||
[ "$(which mkfs.ext2 2>/dev/null)" ] && FSOPTS="$FSOPTS ext2 Ext2"
|
||||
[ "$(which mkfs.ext3 2>/dev/null)" ] && FSOPTS="$FSOPTS ext3 Ext3"
|
||||
[ "$(which mkreiserfs 2>/dev/null)" ] && FSOPTS="$FSOPTS reiserfs Reiser3"
|
||||
[ "$(which mkfs.xfs 2>/dev/null)" ] && FSOPTS="$FSOPTS xfs XFS"
|
||||
[ "$(which mkfs.jfs 2>/dev/null)" ] && FSOPTS="$FSOPTS jfs JFS"
|
||||
|
@ -985,19 +983,21 @@ installpkg() {
|
|||
fi
|
||||
}
|
||||
|
||||
# donetwork()
|
||||
# Hand-hold through setting up networking
|
||||
#
|
||||
# args: none
|
||||
# returns: 1 on failure
|
||||
donetwork() {
|
||||
INTERFACE=
|
||||
S_DHCP=
|
||||
ifaces=$(ifconfig -a | egrep "Ethernet" | cut -d' ' -f1 | sed 's|$| _|g')
|
||||
ifaces=$(ifconfig -a | grep "Link encap:Ethernet"| sed 's/ \+Link encap:Ethernet \+HWaddr \+/ /g')
|
||||
if [ "$ifaces" = "" ]; then
|
||||
DIALOG --yesno "Cannot find any ethernet interfaces. You probably haven't loaded\nyour network module yet. You have two options:\n\n 1) Probe for the correct module now.\n 2) Switch to another VC (ALT-F2) and load your module\n with the modprobe command, then switch back here (ALT-F1)\n and continue.\n\nIf you know which module you need, you should do Step 2 and\nselect NO below. If you don't know which module you need,\nchoose Step 1 by selecting YES below.\n\nProbe for network module?" 18 70
|
||||
DIALOG --yesno "Cannot find any ethernet interfaces. You probably haven't loaded\nyour network module yet. You have two options:\n\n 1) Probe for not detectable module now. (very old hardware)\n 2) Switch to another VC (ALT-F2) and load your module\n with the modprobe command, then switch back here (ALT-F1)\n and continue.\n\nIf you know which module you need, you should do Step 2 and\nselect NO below. If you don't know which module you need,\nchoose Step 1 by selecting YES below.\n\nProbe for network module?" 18 70
|
||||
if [ $? -eq 0 ]; then
|
||||
probenic
|
||||
if [ $? -gt 0 ]; then
|
||||
return 1
|
||||
net_notdetectable
|
||||
fi
|
||||
fi
|
||||
ifaces=$(ifconfig -a | egrep "Ethernet" | cut -d' ' -f1 | sed 's|$| _|g')
|
||||
ifaces=$(ifconfig -a | grep "Link encap:Ethernet"| sed 's/ \+Link encap:Ethernet \+HWaddr \+/ /g')
|
||||
if [ "$ifaces" = "" ]; then
|
||||
DIALOG --msgbox "No network interfaces available." 0 0
|
||||
return 1
|
||||
|
@ -1005,13 +1005,13 @@ donetwork() {
|
|||
fi
|
||||
while [ "$INTERFACE" = "" ]; do
|
||||
DIALOG --msgbox "Available Ethernet Interfaces:\n$(ifconfig -a | egrep "Ethernet" | sed 's# #_#g')\n\nIf your ethernet interface is not listed,\n1) Probe for the correct module now.\n2) Switch to another VC (ALT-F2) and load your module with\n the modprobe command, then switch back here (ALT-F1)\n" 0 0
|
||||
dialog --backtitle "$TITLE" --extra-button --extra-label "Probe" --ok-label "Select" --menu "Select a network interface" 14 55 7 $ifaces 2>$ANSWER
|
||||
ifaces=$(ifconfig -a | grep "Link encap:Ethernet"| sed 's/ \+Link encap:Ethernet \+HWaddr \+/ /g')
|
||||
DIALOG --extra-button --extra-label "Probe" --ok-label "Select" --menu "Select a network interface" 14 55 7 $ifaces 2>$ANSWER
|
||||
case $? in
|
||||
1) return 1 ;;
|
||||
0) INTERFACE=$(cat $ANSWER) ;;
|
||||
*) probenic ;;
|
||||
*) net_notdetectable ;;
|
||||
esac
|
||||
ifaces=$(ifconfig -a | egrep "Ethernet" | cut -d' ' -f1 | sed 's|$| _|g')
|
||||
done
|
||||
DIALOG --yesno "Do you want to use DHCP?" 0 0
|
||||
if [ $? -eq 0 ]; then
|
||||
|
@ -1066,33 +1066,12 @@ donetwork() {
|
|||
S_NET=1
|
||||
}
|
||||
|
||||
probenic() {
|
||||
workdir="$PWD"
|
||||
DIALOG --infobox "Looking for a matching ethernet module. Please wait..." 0 0
|
||||
printk off
|
||||
|
||||
cd /lib/modules/$(uname -r)/kernel/drivers/net
|
||||
if [ $? -gt 0 ]; then
|
||||
DIALOG --msgbox "No ethernet modules were found!" 0 0
|
||||
printk on
|
||||
cd "$workdir"
|
||||
return 1
|
||||
fi
|
||||
net_notdetectable() {
|
||||
# modules with no modalias exported! status kernel 2.6.18
|
||||
NOTDETECTABLE="hp ne de4x5 wd cs89x0 eepro smc9194 seeq8005 ni52 ni65 ac3200 smc-ultra at1700 hp-plus depca eexpress 82596 de600 eth16i de620 lance ewrk3 e2100 lp486e 3c501 3c503 3c505 3c507 3c509 3c515 myri10ge"
|
||||
for mod in ${NOTDETECTABLE}; do
|
||||
modprobe $mod >/dev/null 2>&1
|
||||
done
|
||||
|
||||
ifconfig -a | egrep "Ethernet" >/dev/null 2>&1
|
||||
if [ $? -gt 0 ]; then
|
||||
DIALOG --msgbox "No matching ethernet modules found." 0 0
|
||||
else
|
||||
DIALOG --msgbox "Probe succeeded. Your network module is loaded." 0 0
|
||||
fi
|
||||
|
||||
printk on
|
||||
cd "$workdir"
|
||||
}
|
||||
|
||||
dolilo() {
|
||||
|
@ -1431,7 +1410,7 @@ prepare_harddrive()
|
|||
NEXTITEM="3"
|
||||
}
|
||||
|
||||
dohwdetect
|
||||
dohwdetect()
|
||||
{
|
||||
HWDETECT=""
|
||||
HWPARAMETER=""
|
||||
|
@ -1468,7 +1447,7 @@ dohwdetect
|
|||
fi
|
||||
}
|
||||
|
||||
dodsdt
|
||||
dodsdt()
|
||||
{
|
||||
DSDT_ENABLE=""
|
||||
DIALOG --defaultno --yesno "Do you need support for booting the kernel with a custom DSDT file?" 0 0 && DSDT_ENABLE=1
|
||||
|
@ -1487,7 +1466,7 @@ dodsdt
|
|||
fi
|
||||
}
|
||||
|
||||
doparameters
|
||||
doparameters()
|
||||
{
|
||||
if [ -s /tmp/.keymap ]; then
|
||||
DIALOG --yesno "Do you want to use the keymap: $(cat /tmp/.keymap | sed -e 's/\..*//g') in rc.conf?" 0 0 && sed -i -e "s/^KEYMAP=.*/KEYMAP=\"$(cat /tmp/.keymap | sed -e 's/\..*//g')\"/g" ${DESTDIR}/etc/rc.conf
|
||||
|
|
Loading…
Reference in a new issue