static usb ethnet addresses
[automated-distro-installer] / fai / config / class / 20-hwdetect.sh
1 #! /bin/bash
2
3 # (c) Thomas Lange, 2002-2013, lange@cs.uni-koeln.de
4
5 # NOTE: Files named *.sh will be evaluated, but their output ignored.
6
7 [ $do_init_tasks -eq 1 ] || return 0 # Do only execute when doing install
8
9 echo 0 > /proc/sys/kernel/printk
10
11 # example how to load modules depending on the kernel version
12 #case $(uname -r) in
13 # 2.6*) kernelmodules="$kernelmodules mptspi dm-mod md-mod aes dm-crypt" ;;
14 # [3456]*) kernelmodules="$kernelmodules mptspi dm-mod md-mod aes dm-crypt" ;;
15 #esac
16
17 for mod in $kernelmodules; do
18 [ X$verbose = X1 ] && echo Loading kernel module $mod
19 modprobe -a $mod 1>/dev/null 2>&1
20 done
21
22 # show the basic information about the network interface
23 ip -br li show up|egrep -v ^lo; ip -br a show up|egrep -v ^lo
24
25 echo $printk > /proc/sys/kernel/printk
26
27 odisklist=$disklist
28 set_disk_info # recalculate list of available disks
29 if [ "$disklist" != "$odisklist" ]; then
30 echo New disklist: $disklist
31 echo disklist=\"$disklist\" >> $LOGDIR/additional.var
32 fi
33
34 save_dmesg # save new boot messages (from loading modules)