diff options
author | Dirk von Suchodoletz | 2007-04-29 23:33:56 +0200 |
---|---|---|
committer | Dirk von Suchodoletz | 2007-04-29 23:33:56 +0200 |
commit | 8e08d3ebd28b3ddd3f56c8e1c4618d5354d932f8 (patch) | |
tree | c32cc17b29173f8c0679641f921b06615d3025da | |
parent | Fix and cleanup for fileget ... (diff) | |
download | core-8e08d3ebd28b3ddd3f56c8e1c4618d5354d932f8.tar.gz core-8e08d3ebd28b3ddd3f56c8e1c4618d5354d932f8.tar.xz core-8e08d3ebd28b3ddd3f56c8e1c4618d5354d932f8.zip |
Fixed error from removing of "MAC", check the usage of macaddr for XEN!
Gave more room for SLX version string. The variable $DISTRO is to be
filled in with the export name (to be compatible with directory naming
of config directories ...), see BootRootVerzeichnisse for that ...
git-svn-id: http://svn.openslx.org/svn/openslx/trunk@965 95ad53e4-c205-0410-b2fa-d234c58c8868
-rwxr-xr-x | initramfs/initrd-stuff/bin/servconfig | 6 | ||||
-rw-r--r-- | initramfs/initrd-stuff/etc/functions | 7 | ||||
-rwxr-xr-x | initramfs/initrd-stuff/init | 2 |
3 files changed, 8 insertions, 7 deletions
diff --git a/initramfs/initrd-stuff/bin/servconfig b/initramfs/initrd-stuff/bin/servconfig index 2354cfb8..ca1ccbb3 100755 --- a/initramfs/initrd-stuff/bin/servconfig +++ b/initramfs/initrd-stuff/bin/servconfig @@ -60,8 +60,8 @@ cp -a /rootfs/* /mnt 2>/dev/null # set greeting and add information on booted system (distro) len=$(expr length ${SLXVERSION}${DISTRO}) -vdstr="v${SLXVERSION}/${DISTRO})" -while [ $len -le 20 ] ; do +vdstr="V${SLXVERSION}/${DISTRO})" +while [ $len -le 28 ] ; do vdstr="$vdstr " len=$(expr $len + 1) done @@ -79,7 +79,7 @@ echo " | |_| | | | |___| | | | ____| | |___ / / _____/|__| |______|__| |__| |_______|______|__| |__| - Stateless Workstation ($vdstr (c) <OpenSLX.ORG project> + Stateless Workstation ($vdstr (c) <OpenSLX.ORG> ">/mnt/etc/issue ############################################################################# diff --git a/initramfs/initrd-stuff/etc/functions b/initramfs/initrd-stuff/etc/functions index e9f1a4c5..9f5ed45b 100644 --- a/initramfs/initrd-stuff/etc/functions +++ b/initramfs/initrd-stuff/etc/functions @@ -218,8 +218,8 @@ local netdev="eth${vifnum}" local pdev="p${netdev}" local vdev="veth${vifnum}" local vif0="vif0.${vifnum}" -local mac=$(ip link show ${netdev} | sed -n '/^.*link\/ether/p' \ - | sed -e 's/.*ether \(..:..:..:..:..:..\).*/\1/') +# fixme: that is the mac address of eth0 device +local mac=$macaddr brctl addbr ${bridge} brctl stp ${bridge} off @@ -373,7 +373,6 @@ if [ -n "$filesrc" ] ; then local cfgfile="/$(uri_token $filesrc path)" local tftpserver=$(checkip $(uri_token $filesrc server)) tftpgetunpack $tftp $cfgfile $tftpserver - echo "tftpgetunpack $tftp $cfgfile $tftpserver" >> /tmp/confviafile else # predefined value for openslx environment; it is expected that this # directory is just below the tftpboot/tftproot (path to which the @@ -384,7 +383,7 @@ else # and try last distro default ... echo -e "\n## Configuration via fileget: Hierarchy is distro client \ and as last\n# distro/default" >> /tmp/confviafile - mac=$(echo $MAC|sed "s/:/-/g") + mac=$(echo $macaddr|sed "s/:/-/g") for cfgfile in $cfgdir/$DISTRO/01-$mac.tgz $cfgdir/$DISTRO/default.tgz \ $cfgdir/01-$mac.tgz $cfgdir/default.tgz ; do tftpgetunpack $cfgfile $tftpserver && break diff --git a/initramfs/initrd-stuff/init b/initramfs/initrd-stuff/init index 653554a0..befb4fa6 100755 --- a/initramfs/initrd-stuff/init +++ b/initramfs/initrd-stuff/init @@ -298,6 +298,8 @@ hwautocfg nwmod ip link set dev lo up ip addr add 127.0.0.1/8 dev lo ip link set dev eth0 up || error "$init_noeth" +macaddr=$(ip link show dev eth0|sed -n "/ether [0-9e-f]\{2\}:.*/p" \ + |sed -e "s/.*ether //;s/ .*//") # XEN bridge config [ -n "$xenbr" ] && xenbr_config |