#! /bin/sh set -e set -x # Set up the ethernet. cat >/etc/sysconfig/network-scripts/ifcfg-eth0 </etc/sysconfig/network < 2 /sbin/modprobe ne2k-pci /etc/init.d/network restart echo -n '.' > 2 # Set the server address. cat >/etc/hosts < 2 # Make sure that the server is reachable. ping -c 1 dls echo -n '.' > 2 # Restart X. perl -e '$in = 0; while (<>) { $in = 1 if /^Section "Device"/; $in = 0 if /^EndSection/; if ($in == 1) { s/VendorName\s.*/VendorName "Cirrus Logic"/; s/BoardName\s.*/BoardName "Cirrus Logic GD544x"/; s/Driver\s.*/Driver "cirrus"/; }; print; }' -i /etc/X11/xorg.conf /etc/init.d/dm restart echo -n '.' > 2 set +e # Wait for vncviewer. count=20 while test $count -gt 0; do echo -n ':' > 2 pid="`/sbin/pidof vncviewer`" if test "x$pid" = x; then sleep 1 else break fi count=`expr $count - 1` done if test $count -eq 0; then echo 'vncviewer did not start' exit 1 fi exit 0