Bash shell-script läuft nicht (suse 7.0 pro)
Hallo Leute, ich habe folgendes Problem: ich habe versucht für meinen Rechner (Daten siehe unten) die neuen Linux-Treiber für mein internes Modem zu installieren (dafür siehe ebenfalls ältere Mail von mir... das Ding läuft immer noch nicht). Das von Creatix zur Verfügung gestellte makefile und die entsprechenden Shell-scripts konnten von meiner Bash nicht ausgeführt werden. Dabei konnte unter anderem die Shell gesetzte Variablen (wie z. B. $KERNVER) nicht schreiben. Lehre Zeile ohne dem „#“-Zeichen am Anfang (wird für Kommentare verwandet) wurden beim ausführen mit „: command noth found“ angezeigt. Solche Probleme hatte ich nie mit Unix. Konnte es sein daß ich aus versehen ein paar Module oder Bibliotheken vergessen habe zu laden? Ich freue mich für jede Nachricht. Vielen Dank für eure Hilfe im voraus, Garlic Hardware: LT/MD 9399 von Medion (bekannt auch als Aldi-Notebook 2000) bauähnlich wie ASUS L7300G Prozessor: PIII 600 Graphik: Silicon Motion Lynx3DM (SM 720 b1 bzw. SM721) Modem: Creatix V90HaM mit Ambient Chipsatz Linux: Suse 7.0-Pro Edition Beispieldatei: --------------------------------------------------------- #!/bin/sh #********************************************************************************** # Copyright (c) 1999-2000, Intel Corporation # # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are met: # # 1. Redistributions of source code must retain the above copyright notice, # this list of conditions and the following disclaimer. # # 2. Redistributions in binary form must reproduce the above copyright notice, # this list of conditions and the following disclaimer in the documentation # and/or other materials provided with the distribution. # # 3. Neither the name of Intel Corporation nor the names of its contributors # may be used to endorse or promote products derived from this software # without specific prior written permission. # # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ``AS IS'' # AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE # IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE # DISCLAIMED. IN NO EVENT SHALL CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, # INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT # LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR # PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF # LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING # NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, # EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. # #*********************************************************************************** KERNVER=`cat /proc/version | awk "{print \\$3}"` echo running kernel $KERNVER echo installing echo hamcfg install -o root -g root -m 744 hamcfg /usr/sbin echo hamtool install -o root -g root -m 744 hamtool /usr/sbin echo hamdata install -o root -g root -m 644 hamdata /etc/.hamdata echo serial module install -o root -g root -m 744 ham.o /lib/modules/$KERNVER/misc/ham.o echo core module install -o root -g root -m 744 hamcore.o /lib/modules/$KERNVER/misc/hamcore.o if [ -a /etc/mandrake-release ]; then { echo mandrake hamboot script install -o root -g root -m 755 hamboot /etc/rc.d/init.d ln -s -f /etc/rc.d/init.d/hamboot /etc/rc.d/rc2.d/S99hamboot ln -s -f /etc/rc.d/init.d/hamboot /etc/rc.d/rc3.d/S99hamboot ln -s -f /etc/rc.d/init.d/hamboot /etc/rc.d/rc5.d/S99hamboot } elif [ -a /etc/SuSE-release ]; then { DISTVER=`grep VERSION /etc/SuSE-release | cut -f3 -d' '` echo SuSE version ${DISTVER} case $DISTVER in 6*|7.0) echo "SuSE <= 7.0 boot scripts" INITDIR='/sbin/init.d' ;; 7.1) echo "SuSE 7.1 boot scripts" INITDIR='/etc/init.d' ;; *) echo "unsupported SuSE version. no boot scripts installed" exit 1 ;; esac install -o root -g root -m 755 hamboot $INITDIR ln -s -f ${INITDIR}/hamboot ${INITDIR}/boot.d/S99hamboot } elif [ -a /etc/redhat-release ]; then { echo redhat hamboot rc2.d and rc3.d scripts install -o root -g root -m 755 hamboot /etc/rc.d/init.d ln -s -f /etc/rc.d/init.d/hamboot /etc/rc.d/rc2.d/S99hamboot ln -s -f /etc/rc.d/init.d/hamboot /etc/rc.d/rc3.d/S99hamboot ln -s -f /etc/rc.d/init.d/hamboot /etc/rc.d/rc5.d/S99hamboot } elif [ -a /etc/conectiva-release ]; then { echo conectiva hamboot rc3.d and rc5.d scripts install -o root -g root -m 755 hamboot /etc/rc.d/init.d ln -s -f /etc/rc.d/init.d/hamboot /etc/rc.d/rc3.d/S99hamboot ln -s -f /etc/rc.d/init.d/hamboot /etc/rc.d/rc5.d/S99hamboot } elif [ -a /etc/debian_version ]; then { echo debian hamboot rc2.d and rc3.d scripts install -o root -g root -m 755 hamboot /etc/init.d ln -s -f /etc/init.d/hamboot /etc/rc2.d/S99hamboot ln -s -f /etc/init.d/hamboot /etc/rc3.d/S99hamboot } elif [ -a /etc/slackware-version ]; then { echo seting up slackware hamboot script install -o root -g root -m 755 hamboot /etc/rc.d if ! grep hamboot /etc/rc.d/rc.local > /dev/null 2> /dev/null; then { echo "/etc/rc.d/hamboot start" >> /etc/rc.d/rc.local } fi } else { echo unknown distribution. no boot scripts installed exit 1 } fi echo starting module and utilities /bin/bash hamboot start echo done _________________________________________________________________________ Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com.
On Fri, 6 Apr 2001, Johannes Gasis wrote:
[...] Linux: Suse 7.0-Pro Edition
Beispieldatei: ---------------------------------------------------------
#!/bin/sh
#********************************************************************************** # Copyright (c) 1999-2000, Intel Corporation [...]
KERNVER=`cat /proc/version | awk "{print \\$3}"` ^^ So wie ich das sehe ist da ein Fehler im awk-Befehl. Mit einem Backslash muesste das dann eigentlich funktionieren. Abgesehen davon kannst Du Deine Kernel-Version aber auch direkt in die Variable KERNVER schreiben, die in der Datei /proc/version steht, oder aber auch mit dem Befehl uname -r herauszufinden ist.
HTH, Heinrich
participants (2)
-
Heinrich Kuespert
-
Johannes Gasis