Hi Thomas,
On 06/10/2015 05:19 PM, Thomas Lange wrote:
> $disklist is set via a call of set_disk_info in
> 20-hwdetect.source. After that the variable should be set.
Nope, unfortunately it's not. Attached you find a slightly modified
version of 20-hwdetect.source (loading kernel module usb_storage and
some debugging messages at the end) and the corresponding output.
Any ideas?
Martin
--
Martin Konrad
Control System Engineer
Facility for Rare Isotope Beams
Michigan State University
640 South Shaw Lane
East Lansing, MI 48824-1321, USA
Tel. 517-908-7253
Email: kon...@frib.msu.edu
Executing /var/lib/fai/config/class/20-hwdetect.source.
loading kernel module sd_mod
loading kernel module sr_mod
loading kernel module usb_storage
loading kernel module mptspi
loading kernel module dm-mod
loading kernel module md-mod
loading kernel module aes
loading kernel module dm-crypt
2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP qlen 1000
link/ether 00:13:3a:06:7f:7e brd ff:ff:ff:ff:ff:ff
inet 192.168.1.14/24 brd 192.168.1.255 scope global eth0
inet6 fe80::213:3aff:fe06:7f7e/64 scope link
3: eth1: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc mq state DOWN qlen 1000
link/ether 00:13:3a:06:7f:7f brd ff:ff:ff:ff:ff:ff
4: eth2: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc mq state DOWN qlen 1000
link/ether 00:13:3a:06:7f:80 brd ff:ff:ff:ff:ff:ff
5: eth3: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc mq state DOWN qlen 1000
link/ether 00:13:3a:06:7f:81 brd ff:ff:ff:ff:ff:ff
BEGIN PARTITIONS
major minor #blocks name
8 0 30981120 sda
END PARTITIONS
DISKLIST=
20-hwdetect.source OK.
#! /bin/bash
# (c) Thomas Lange, 2002-2012, la...@informatik.uni-koeln.de
# NOTE: Files named *.source will be evaluated, but their output ignored.
Instead
# the contents of $newclasses will be added to the list of defined classes.
[ $do_init_tasks -eq 1 ] || return 0 # Do only execute when doing install
echo 0 > /proc/sys/kernel/printk
# wheezy does not have -m and modules.pcimap
depmod -m 2>/dev/null
if [ -f "/lib/modules/`uname -r`/modules.pcimap" ]; then
for module in $(pcimodules) ; do
[ "$verbose" ] && echo loading kernel module $module
modprobe "$module"
done
fi
# here, you can load modules depending on the kernel version
kernelmodules="sd_mod sr_mod usb_storage"
case $(uname -r) in
2.6*) kernelmodules="$kernelmodules mptspi dm-mod md-mod aes dm-crypt" ;;
3*) kernelmodules="$kernelmodules mptspi dm-mod md-mod aes dm-crypt" ;;
esac
for mod in $kernelmodules; do
[ "$verbose" ] && echo loading kernel module $mod
modprobe -a $mod 1>/dev/null 2>&1
done
ip ad show up | egrep -iv 'loopback|127.0.0.1|::1/128|_lft'
echo $printk > /proc/sys/kernel/printk
echo "BEGIN PARTITIONS" >&2
cat /proc/partitions >&2
echo "END PARTITIONS" >&2
set_disk_info # calculate number of available disks
echo "DISKLIST=${disklist}" >&2
save_dmesg # save new boot messages (from loading modules)