TOP
SSV Software Systems Register  Register
Log in to check your private messages  Log in to check your private messages
Startseite FAQ Search Mitglieder Profile  Log in 
SSV Support-Forum
DHCP Client
Goto page Previous  1, 2
 
Post new topic   Reply to topic    SSV-Forum Forum Index >>> ADNP/1520
<<< Previous topic - Next topic >>>  
Display posts from previous:   
Author Message
marco76



Joined: 18 Jan 2007
Posts: 10
Location: Graz

PostPosted: 02.05.2007, 09:54    Post subject: Reply with quote

Hallo Klaus!

Das Image mit DHCP Client und autoinit.sh um Hostnamen an den DHCP Server zu übergeben funktioniert leider nur in einem Netz mit DHCP Server. Sobald die Statische IP verwendet werden sollte, also Netz ohne DHCP Server, bekomm ich folgende Fehlermeldung:
"eth0 -dhcp /etc/rcS.d/S40network: cannot create /proc/sys/dev/eth0/leda: No such file or directory"

Schlussendlich wird dann dem DilNet nicht die eingespeicherte IP (ipaddree ..) übergeben, sondern 127.0.0.1 .. !!

Meiner Meinung nach kann das nur daran liegen, dass das sbin/dhcpcd script zweckentfremdet, bzw. mit dem Inhalt aus autoinit.sh überschrieben wird.

Meine Frage nun:
Wie kann ich das Image mit DCHP Client und zugewiesenem Hostnamen verwenden, auch wenn ich die einprogrammierte IP verwenden will (also Netz ohne DHCP Server) und keine dynamische IP beziehen will?

Gruß
Marco
Back to top
View user's profile Send private message
kdw



Joined: 05 May 2006
Posts: 1460

PostPosted: 03.05.2007, 17:25    Post subject: Fallback IP ... Reply with quote

Hallo Marco.

Man kann das Beispiel noch verbessern, um auch die „Fallback IP“ zu setzen.

alte Zeilt: /sbin/dhcpcd-orig -h emblinux -t 10 eth0
neue Zeile: /sbin/dhcpcd-orig -h emblinux -t 10 eth0 || exit 1

Dann sieht es so aus:

#!/bin/sh

#save DHCP client
mv /sbin/dhcpcd /sbin/dhcpcd-orig

#create new DHCP client script
cat > /sbin/dhcpcd << EOF
#!/bin/sh
#interface: eth0 - timeout: 10 sec - hostname: emblinux
/sbin/dhcpcd-orig -h emblinux -t 10 eth0 || exit 1
exit 0
EOF

#make script executable
chmod 755 /sbin/dhcpcd


Anmerkung: Die IP "127.0.0.1" ist das Local Host Interface und nicht die Ethernet-Schnittstelle.

Gruß

KDW
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    SSV-Forum Forum Index >>> ADNP/1520 All times are GMT + 1 Hour
Goto page Previous  1, 2
Page 2 of 2

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum

SSV Software Systems GmbH

Dünenweg 5
30419 Hannover

Fon: +49(0)511  ·  40 000-0
Fax: +49(0)511  ·  40 000-40

sales@ssv-embedded.de


Impressum    ·    Datenschutz    ·    AGB

© 2023 SSV SOFTWARE SYSTEMS GmbH. Alle Rechte vorbehalten.

ISO 9001:2015