Navigacija
Lista poslednjih: 16, 32, 64, 128 poruka.

Problem sa ndiswrapper skriptom

[es] :: Skript jezici :: Problem sa ndiswrapper skriptom

[ Pregleda: 2908 | Odgovora: 6 ] > FB > Twit

Postavi temu Odgovori

Autor

Pretraga teme: Traži
Markiranje Štampanje RSS

apex
kikinda

Član broj: 31144
Poruke: 918
82.208.201.*

Sajt: www.polovni-delovi.com


+1 Profil

icon Problem sa ndiswrapper skriptom18.07.2006. u 11:34 - pre 216 meseci
Napravio sam ovu skriptu sa ciljem da mi se automatski instalira drajver pri podizaju sistema i jos po neka stvarcica, ali skript ne radi.

Code:

ndiswrapper -i /root/NET8180.INF 
 #no need for second line 
 #ndiswrapper -i net8180.sys 
 
 modprobe ndiswrapper 
 
 ndiswrapper -m 
 
 ifconfig wlan0 up 
 
 #now let's setup the wireless card 
 ifconfig wlan0 inet 192.168.2.50 
 
 #Acquire an IP address... 
 #this step i don't know for what is (removing something?) 
 #rm -f /etc/dhcpc/dhcpcd-wlan0.pid 
 
 #dhcpcd -t 10 wlan0 
 
 
 #Next I add the required information for connecting to net 
 #whay I need to setup ap to 00:00:00:00:00:00 I dont know - worked without this before 
 #iwconfig wlan0 ap 00:00:00:00:00:00 
 
 iwconfig wlan0 ESSID buscomp2 
 #ifconfig wlan0 up 
 
 ifconfig eth0 inet 168.168.168.1 
 
 echo 1 > /proc/sys/net/ipv4/ip_forward 

 
 iptables --flush 
 iptables --table nat --flush 
 iptables --delete-chain 
 iptables --table nat --delete-chain 
 
 # Set up IP FORWARDing and Masquerading 
 iptables --table nat --append POSTROUTING --out-interface ppp0 -j MASQUERADE 
 iptables --append FORWARD --in-interface eth0 -j ACCEPT 
 
 
 x11vnc 


Ovo mi izbacuje kao greske a ne znam zasto

Code:
ndiswrapper -i 
 : command not found23: 
  not found.le ndiswrapper 
 : command not found25: 
 : command not found26: 
 Usage: ndiswrapper OPTION 
 
 Manage ndis drivers for ndiswrapper. 
 -i inffile        Install driver described by 'inffile' 
 -d devid driver   Use installed 'driver' for 'devid' 
 -e driver         Remove 'driver' 
 -l                List installed drivers 
 -m                Write configuration for modprobe 
 -hotplug          (Re)Generate hotplug information 
 
 
 where 'devid' is either PCIID or USBID of the form XXXX:XXXX 
 : command not found29: 
 : command not found31: 
 : command not found34: 
 : command not found38: 
 : command not found40: 
 : command not found41: 
 : command not found45: 
 : No such file or directoryc/sys/net/ipv4/ip_forward 
 : command not found52: 
 'ptables v1.2.11: Unknown arg `--flush 
 Try `iptables -h' or 'iptables --help' for more information. 
 'ptables v1.2.11: Unknown arg `--flush 
 Try `iptables -h' or 'iptables --help' for more information. 
 'ptables v1.2.11: Unknown arg `--delete-chain 
 Try `iptables -h' or 'iptables --help' for more information. 
 'ptables v1.2.11: Unknown arg `--delete-chain 
 Try `iptables -h' or 'iptables --help' for more information. 
 : command not found57: 
 'ptables v1.2.11: Invalid target name `MASQUERADE 
 Try `iptables -h' or 'iptables --help' for more information. 
 'ptables v1.2.11: Invalid target name `ACCEPT 
 Try `iptables -h' or 'iptables --help' for more information. 
 : command not found61: 
 : command not found62:


kada rucno unosim ove komande sve prolazi bez problema. Gde gresim?
http://www.polovni-delovi.com - Najveći portal polovnih delova za sve tipove vozila
 
Odgovor na temu

apex
kikinda

Član broj: 31144
Poruke: 918
82.208.201.*

Sajt: www.polovni-delovi.com


+1 Profil

icon Re: Problem sa ndiswrapper skriptom18.07.2006. u 21:18 - pre 216 meseci
Evo nemam vise ideja i neradi da mu jm ceo dan se zaj... sa ovim

Code:
#!/bin/bash

/usr/sbin/ndiswrapper -i /root/NET8180.INF

#no need for second line
#ndiswrapper -i net8180.sys

/usr/sbin/ndiswrapper -m

/sbin/modprobe ndiswrapper

/sbin/ifconfig wlan0 up

#now let's setup the wireless card

/sbin/ifconfig wlan0 inet 192.168.2.50

#Acquire an IP address...
#this step i don't know for what is (removing something?)
#rm -f /etc/dhcpc/dhcpcd-wlan0.pid

#dhcpcd -t 10 wlan0

#Next I add the required information for connecting to net
#whay I need to setup ap to 00:00:00:00:00:00 I dont know - worked without this before
#iwconfig wlan0 ap 00:00:00:00:00:00

/sbin/iwconfig wlan0 ESSID buscomp2
#ifconfig wlan0 up

/sbin/ifconfig eth0 inet 168.168.168.1

/usr/bin/echo 1 > /proc/sys/net/ipv4/ip_forward

/usr/sbin/iptables --flush
/usr/sbin/iptables --table nat --flush
/usr/sbin/iptables --delete-chain
/usr/sbin/iptables --table nat --delete-chain

# Set up IP FORWARDing and Masquerading
/usr/sbin/iptables --table nat --append POSTROUTING --out-interface ppp0 -j MASQUERADE
/usr/sbin/iptables --append FORWARD --in-interface eth0 -j ACCEPT

x11vnc

http://www.polovni-delovi.com - Najveći portal polovnih delova za sve tipove vozila
 
Odgovor na temu

random
Vladimir Vrzić
Beograd

Član broj: 85
Poruke: 3866
*.eunet.yu.

Sajt: www.last.fm/user/vrza


+4 Profil

icon Re: Problem sa ndiswrapper skriptom21.07.2006. u 07:26 - pre 216 meseci
Skript deluje ok, ali je output zaista neobičan. Probaj da ga pokreneš sa sh -x skript.
int rand(void);

Those who do not understand Unix are condemned to reinvent it, poorly.

Upali lampicu — koristi Jabber!
 
Odgovor na temu

apex
kikinda

Član broj: 31144
Poruke: 918
82.208.201.*

Sajt: www.polovni-delovi.com


+1 Profil

icon Re: Problem sa ndiswrapper skriptom21.07.2006. u 09:12 - pre 216 meseci

Problem sam vec resio. Posto sam kucao u nekom win editoru, desilo se da posle svakog prelaska u novi red editor nekako ubaci ''nevidljivo'' ''^M'' i script je pucao zbog toga. To famozno ''^M'' nisam video ni u doticnom editoru ni u notepad-u, ni sa opcijom lister, ni sa Kate-om, cak ni mc komander view nije nista prikazivao.
posle celog dana palo mi na pamet da ga otvorim sa mcedit i voala.

U svakom slucaju hvala na zainteresovanosti.
pozz
http://www.polovni-delovi.com - Najveći portal polovnih delova za sve tipove vozila
 
Odgovor na temu

random
Vladimir Vrzić
Beograd

Član broj: 85
Poruke: 3866
*.eunet.yu.

Sajt: www.last.fm/user/vrza


+4 Profil

icon Re: Problem sa ndiswrapper skriptom22.07.2006. u 15:17 - pre 216 meseci
Aha, to ^M je ti carriage return karakter. Tekst fajlovi u DOS i Windows okruženju koriste dva karaktera (CR LF) za prelazak novi red, dok se na Unixu koristi samo LF (line feed). Bolji editori automatski detektuju da li je tekst fajl u DOS ili Unix formatu.
int rand(void);

Those who do not understand Unix are condemned to reinvent it, poorly.

Upali lampicu — koristi Jabber!
 
Odgovor na temu

Marko_R
Marko Ranđelović
Programer
Niš

Član broj: 3737
Poruke: 575



+4 Profil

icon Re: Problem sa ndiswrapper skriptom22.07.2006. u 17:33 - pre 216 meseci
Čudno, mada nikad nisam koristio shell skripte kucane na windows-u, koristio sam php skripte i radile su.
 
Odgovor na temu

random
Vladimir Vrzić
Beograd

Član broj: 85
Poruke: 3866
*.eunet.yu.

Sajt: www.last.fm/user/vrza


+4 Profil

icon Re: Problem sa ndiswrapper skriptom22.07.2006. u 21:03 - pre 216 meseci
Iz čega se može zaključiti da PHP "guta" bilo koji format tekst fajla, dok bash zahteva Unix format. Srećom konverzija se lako obavlja, komandom poput tr -d \\r < dosfile > unixfile.
int rand(void);

Those who do not understand Unix are condemned to reinvent it, poorly.

Upali lampicu — koristi Jabber!
 
Odgovor na temu

[es] :: Skript jezici :: Problem sa ndiswrapper skriptom

[ Pregleda: 2908 | Odgovora: 6 ] > FB > Twit

Postavi temu Odgovori

Navigacija
Lista poslednjih: 16, 32, 64, 128 poruka.