Bug#580709: oldsys-preseed: add support for Buffalo Linkstation Pro/Live platform
Package: oldsys-preseed
Version: 3.10
Severity: wishlist
Tags: patch
The attached patch adds support in oldsys-preseed for the Linkstation
Pro/Live platform, similar to Kurobox Pro which is already supported.
This support is necessary for network-console to start without user
interaction, which is important when a serial console is not available.
Comments in the patch describe a caveat regarding preseeding from the
factory default software with a static network configuration.
Index: oldsys-preseed
===================================================================
--- oldsys-preseed (revision 63088)
+++ oldsys-preseed (working copy)
@@ -153,6 +153,40 @@
fi
umount $path/rootfs || true
rmdir $path/rootfs $path || true
+ elif echo "$machine" | grep -q "^Buffalo Linkstation Pro/Live"; then
+ # the default filesystem for the system partition is XFS, which isn't included in our startup environment
+ # however, customized boxes might have ext3 instead, so try to mount anyway
+ rootdev=/dev/sda2
+ path=/tmp/oldsys-preseed
+ mkdir -p $path/rootfs
+ mount -o ro $rootdev $path/rootfs || true
+ INTERFACE=eth0
+ parse_unix_tree $path/rootfs
+ info=$path/rootfs/etc/melco/info
+ if [ -e "$info" ]; then
+ HOSTNAME=$(sed -n '/^hostname/ {s/.*=//; ]}' "$info")
+ usage=$(sed -n '/^my_ipaddress/ {s/.*=//; }' "$info")
+ if [ "$usage" = "dhcp" ]; then
+ NET_CONFIG=dhcp
+ else
+ NET_CONFIG=static
+ IP_ADDRESS=$usage
+ NETMASK=$(sed -n '/^my_subnetmask/ {s/.*=//; p}' "$netinfo")
+ GATEWAY=$(sed -n '/^my_dgw/ {s/.*=//; p}' "$netinfo")
+ fi
+ fi
+ MAC=$(ip addr | grep '^[[:space:]]*link/ether' | head -n 1 | sed 's/.*ether \([^ ]*\).*/\1/')
+ unset_matching_var "HOSTNAME" LS-GL$(echo "$MAC" | sed 's/^..:..:..:..:.//' | sed 's/://g')
+ sanity_check_static_config
+ if [ "$NET_CONFIG" != "static" ]; then
+ IPADDRESS=192.168.11.150
+ NETMASK=255.255.255.0
+ GATEWAY=192.168.11.1
+ [ -z "$NAMESERVERS" ] && NAMESERVERS=192.168.11.1
+ dhcp_fallback $FILE
+ fi
+ umount $path/rootfs || true
+ rmdir $path/rootfs $path || true
elif echo "$machine" | grep -q "^D-Link DNS-323"; then
check_file /proc/mtd
rootfs=$(get_mtdblock "MTD1")
Reply to: