Mam 2 problemy:
1.
Mam następujący skrypt:
Kod: Zaznacz cały
#!/bin/sh
wlanconfig ath0 destroy
wlanconfig ath0 create wlandev wifi0 wlanmode adhoc
ifconfig ath0 down
iwconfig ath0 mode Ad-Hoc
iwconfig ath0 essid MOJA_NAZWA
iwconfig ath0 key open MOJ_KLUCZ
ifconfig ath0 up
dhclient ath0
Kod: Zaznacz cały
ath0
Internet Systems Consortium DHCP Client V3.1.1
Copyright 2004-2008 Internet Systems Consortium.
All rights reserved.
For info, please visit [url]http://www.isc.org/sw/dhcp/[/url]
wifi0: unknown hardware address type 801
wifi0: unknown hardware address type 801
Listening on LPF/ath0/06:**:**:**:**:7c
Sending on LPF/ath0/06:**:**:**:**:7c
Sending on Socket/fallback
DHCPDISCOVER on ath0 to 255.255.255.255 port 67 interval 3
DHCPDISCOVER on ath0 to 255.255.255.255 port 67 interval 3
DHCPDISCOVER on ath0 to 255.255.255.255 port 67 interval 5
DHCPDISCOVER on ath0 to 255.255.255.255 port 67 interval 9
DHCPDISCOVER on ath0 to 255.255.255.255 port 67 interval 20
DHCPDISCOVER on ath0 to 255.255.255.255 port 67 interval 12
DHCPDISCOVER on ath0 to 255.255.255.255 port 67 interval 8
DHCPDISCOVER on ath0 to 255.255.255.255 port 67 interval 1
No DHCPOFFERS received.
No working leases in persistent database - sleeping.
Kod: Zaznacz cały
ath0
IEEE 802.11g ESSID:"" Nickname:""
Mode:Ad-Hoc Frequency:2.412 GHz Cell: 06:**:**:**:**:7c
Bit Rate:0 kb/s Tx-Power:16 dBm Sensitivity=1/1
Retry :o ff RTS thr :o ff Fragment thr :o ff
Encryption key :o ff
Power Management :o ff
Link Quality=28/70 Signal level=-68 dBm Noise level=-96 dBm
Rx invalid nwid:8 Rx invalid crypt:0 Rx invalid frag:0
Tx excessive retries:0 Invalid misc:0 Missed beacon:0

2.
Gdy już ręcznie wpiszę ESSID oraz klucz wynik z dhclient ath0 jest następujący:
Kod: Zaznacz cały
There is already a pid file /var/run/dhclient.pid with pid 6379
killed old client process, removed PID file
Internet Systems Consortium DHCP Client V3.1.1
Copyright 2004-2008 Internet Systems Consortium.
All rights reserved.
For info, please visit [url]http://www.isc.org/sw/dhcp/[/url]
wifi0: unknown hardware address type 801
wifi0: unknown hardware address type 801
Listening on LPF/ath0/06:**:**:**:**:7c
Sending on LPF/ath0/06:**:**:**:**:7c
Sending on Socket/fallback
DHCPREQUEST on ath0 to 255.255.255.255 port 67
DHCPACK from 192.168.**.1
bound to 192.168.**.103 -- renewal in 25 seconds.
Czy ktoś może mi wyjaśnić jak zrobić aby skrypt wykonywał się w całości oraz jak uruchomić komunikacje po przyznaniu adresu przez DHCP?