Domanda per veri esperti! Cambiare nome alla scheda wireless
Moderatore: Staff
Regole del forum
1) Citare sempre la versione di Slackware usata, la versione del Kernel e magari anche la versione della libreria coinvolta. Questi dati aiutano le persone che possono rispondere.
2) Per evitare confusione prego inserire in questo forum solo topic che riguardano appunto Slackware, se l'argomento è generale usate il forum Gnu/Linux in genere.
3) Leggere attentamente le risposte ricevute.
4) Scrivere i messaggi con il colore di default, evitare altri colori.
5) Scrivere in Italiano o in Inglese, se possibile grammaticalmente corretto, evitate stili di scrittura poco chiari, quindi nessuna abbreviazione tipo telegramma o scrittura stile SMS o CHAT.
6) Appena registrati è consigliato presentarsi nel forum dedicato.
La non osservanza delle regole porta a provvedimenti di vari tipo da parte dello staff, in particolare la non osservanza della regola 5 porta alla cancellazione del post e alla segnalazione dell'utente. In caso di recidività l'utente rischia il ban temporaneo.
1) Citare sempre la versione di Slackware usata, la versione del Kernel e magari anche la versione della libreria coinvolta. Questi dati aiutano le persone che possono rispondere.
2) Per evitare confusione prego inserire in questo forum solo topic che riguardano appunto Slackware, se l'argomento è generale usate il forum Gnu/Linux in genere.
3) Leggere attentamente le risposte ricevute.
4) Scrivere i messaggi con il colore di default, evitare altri colori.
5) Scrivere in Italiano o in Inglese, se possibile grammaticalmente corretto, evitate stili di scrittura poco chiari, quindi nessuna abbreviazione tipo telegramma o scrittura stile SMS o CHAT.
6) Appena registrati è consigliato presentarsi nel forum dedicato.
La non osservanza delle regole porta a provvedimenti di vari tipo da parte dello staff, in particolare la non osservanza della regola 5 porta alla cancellazione del post e alla segnalazione dell'utente. In caso di recidività l'utente rischia il ban temporaneo.
- legionario
- Linux 3.x

- Messaggi: 603
- Iscritto il: mer 8 dic 2004, 0:00
- Località: Bergamo - Roma
Domanda per veri esperti! Cambiare nome alla scheda wireless
Ciao a tutti!
<BR>
<BR>Sto cercando di far caricare la mia scheda pcmcia wireless automaticamente ad ogni avvio del sistema. Pertanto, sono andato a modificare debitamente il file rc.wireless.conf ottenendo, pero´, l´errore di periferica sconosciuta. Cosi´, per capire l´origine del problema, mi sono messo di santa pazienza a studiare il contenuto dei files di sistema deputati al caricamento delle schede wireless ed ethernet, cioe´ rc.inet1, rc.inet1.conf, rc.wireless e rc.wireless.conf. Da quanto ho potuto capire, il mancato caricamento all´avvio della mia scheda wireless e´ dovuto al fatto che lo script rc.wireless carica solo le schede descritte in rc.inet1, cioe´ le schede ethernet ethx, mentre la mia pcmcia viene riconosciuta dal sistema come ath0 quindi e´ tagliata fuori dalla logica di rc.inet1. Allora ho modificato rc.wireless e alla riga 21, al posto di "INTERFACE=$1", ho messo "INTEFACE=ath0". In questo modo, con mia grande gioia, la scheda viene correttamente caricata all´avvio, ma (non poteva filare tutto liscio ovviamente) la scheda ethernet non e´ piu´ riconosciuta come attiva da ifconfig, in pratica le due schede non possono coesistere. A questo punto le mie scarse conoscenze di C costringono a fermarmi. Ecco allora la mia domanda: quale stringa devo aggiungere in rc.wireless per far si´ che venga correttamente caricata la mia scheda wireless ath0 e che questa possa coesistere con la mia scheda ethernet eth0?
<BR>
<BR>So perfettamente che tutto questo casino puo´ essere risolto semplicemente aggiungendo un piccolo script in rc.local, ma ormai e´ diventata una questione di sfida, in considerazione, soprattutto, del fatto che ho intenzione di scrivere un approfondito tutorial sulle schede pcmcia wireless, motivo questo che mi spinge a trovare una soluzione molto piu´ elegante e professionale della mera aggiunta di un script in rc.local.
<BR>
<BR>Grazie per la pazienza ragazzi! Lo so che e´ una domanda da un milione di dollari, ma gli unici veri esperti che conosco si trovano in questo forum, per cui siete la mia ultima spiaggia.
<BR>
<BR>Salutoni!!
<BR>
<BR>
<BR>--
<BR>Memento Audere Semper
<BR>
<BR>
<BR>[ Questo Messaggio è stato Modificato da: legionario il 04-02-2005 17:33 ]
<BR>
<BR>
<BR>[ Questo Messaggio è stato Modificato da: legionario il 04-02-2005 19:40 ]
<BR><BR><BR>[ Questo Messaggio è stato Modificato da: legionario il 05-02-2005 15:54 ]<br>
<BR>
<BR>Sto cercando di far caricare la mia scheda pcmcia wireless automaticamente ad ogni avvio del sistema. Pertanto, sono andato a modificare debitamente il file rc.wireless.conf ottenendo, pero´, l´errore di periferica sconosciuta. Cosi´, per capire l´origine del problema, mi sono messo di santa pazienza a studiare il contenuto dei files di sistema deputati al caricamento delle schede wireless ed ethernet, cioe´ rc.inet1, rc.inet1.conf, rc.wireless e rc.wireless.conf. Da quanto ho potuto capire, il mancato caricamento all´avvio della mia scheda wireless e´ dovuto al fatto che lo script rc.wireless carica solo le schede descritte in rc.inet1, cioe´ le schede ethernet ethx, mentre la mia pcmcia viene riconosciuta dal sistema come ath0 quindi e´ tagliata fuori dalla logica di rc.inet1. Allora ho modificato rc.wireless e alla riga 21, al posto di "INTERFACE=$1", ho messo "INTEFACE=ath0". In questo modo, con mia grande gioia, la scheda viene correttamente caricata all´avvio, ma (non poteva filare tutto liscio ovviamente) la scheda ethernet non e´ piu´ riconosciuta come attiva da ifconfig, in pratica le due schede non possono coesistere. A questo punto le mie scarse conoscenze di C costringono a fermarmi. Ecco allora la mia domanda: quale stringa devo aggiungere in rc.wireless per far si´ che venga correttamente caricata la mia scheda wireless ath0 e che questa possa coesistere con la mia scheda ethernet eth0?
<BR>
<BR>So perfettamente che tutto questo casino puo´ essere risolto semplicemente aggiungendo un piccolo script in rc.local, ma ormai e´ diventata una questione di sfida, in considerazione, soprattutto, del fatto che ho intenzione di scrivere un approfondito tutorial sulle schede pcmcia wireless, motivo questo che mi spinge a trovare una soluzione molto piu´ elegante e professionale della mera aggiunta di un script in rc.local.
<BR>
<BR>Grazie per la pazienza ragazzi! Lo so che e´ una domanda da un milione di dollari, ma gli unici veri esperti che conosco si trovano in questo forum, per cui siete la mia ultima spiaggia.
<BR>
<BR>Salutoni!!
<BR>
<BR>
<BR>--
<BR>Memento Audere Semper
<BR>
<BR>
<BR>[ Questo Messaggio è stato Modificato da: legionario il 04-02-2005 17:33 ]
<BR>
<BR>
<BR>[ Questo Messaggio è stato Modificato da: legionario il 04-02-2005 19:40 ]
<BR><BR><BR>[ Questo Messaggio è stato Modificato da: legionario il 05-02-2005 15:54 ]<br>
Domanda per veri esperti! Cambiare nome alla scheda wireless
Puoi configurare rc.inet1.conf aggiungendo una sezione ath0 con le specifiche che vuoi e, se necessario, modificare anche rc.inet1
<BR>
<BR>Stefano<br>
<BR>
<BR>Stefano<br>
- legionario
- Linux 3.x

- Messaggi: 603
- Iscritto il: mer 8 dic 2004, 0:00
- Località: Bergamo - Roma
Domanda per veri esperti! Cambiare nome alla scheda wireless
Eh si´...e´ proprio questo il punto...ma come? Modificare solamente rc.inet1.conf non risolve niente se prima non si fa riconoscere la scheda ath0 da rc.inet1. In rc.inet1 ho creato una nuova sezione che ho chiamato "SCHEDA PCMCIA" copiando all´interno la parte relativa a "ETHERNET FUNCTIONS", ma sostituendo ath al posto di eth, poi ho aggiunto nella sezione "MAIN" le voci relative appunto ad ath0. Il mio scopo l´ho raggiunto, infatti la scheda veniva riconosciuta all´avvio con i parametri esatti, ma la mia scheda ethernet non veniva attivata dal sistema, cioe´ rimaneva down. In pratica si era invertita la situazione iniziale in cui eth0 funzionava dopo l´avvio mentre ath0 no! Per cui mi servirebbe sapere come far attivare entrambe dopo il caricamento del sistema...
<BR>
<BR>Comunque, Stefano, grazie lo stesso per il suggerimento...
<BR>
<BR>Dopo la mia modifica rc.inet1 risulta cosi´:
<BR>--------------------------------------------------------------------------------------
<BR>#! /bin/sh
<BR># /etc/rc.d/rc.inet1
<BR># This script is used to bring up the various network interfaces.
<BR>#
<BR># @(#)/etc/rc.d/rc.inet1 10.0 Sun Jun 6 23:42:32 PDT 2004 (pjv)
<BR>
<BR>############################
<BR># READ NETWORK CONFIG FILE #
<BR>############################
<BR>
<BR># Get the configuration information from /etc/rc.d/rc.inet1.conf:
<BR>. /etc/rc.d/rc.inet1.conf
<BR>
<BR>###########
<BR># LOGGING #
<BR>###########
<BR>
<BR># If possible, log events in /var/log/messages:
<BR>if [ /var/run/syslogd.pid -a -x /usr/bin/logger ]; then
<BR> LOGGER=/usr/bin/logger
<BR>else # output to stdout/stderr:
<BR> LOGGER=/bin/cat
<BR>fi
<BR>
<BR>######################
<BR># LOOPBACK FUNCTIONS #
<BR>######################
<BR>
<BR># Function to bring up the loopback interface. If loopback is
<BR># already up, do nothing.
<BR>lo_up() {
<BR> if grep lo: /proc/net/dev 1> /dev/null ; then
<BR> if ! /sbin/ifconfig | grep "^lo" 1> /dev/null ; then
<BR> echo "/etc/rc.d/rc.inet1: /sbin/ifconfig lo 127.0.0.1" | $LOGGER
<BR> /sbin/ifconfig lo 127.0.0.1
<BR> echo "/etc/rc.d/rc.inet1: /sbin/route add -net 127.0.0.0 netmask 255.0.0.0 lo" | $LOGGER
<BR> /sbin/route add -net 127.0.0.0 netmask 255.0.0.0 lo
<BR> fi
<BR> fi
<BR>}
<BR>
<BR># Function to take down the loopback interface:
<BR>lo_down() {
<BR> if grep lo: /proc/net/dev 1> /dev/null ; then
<BR> echo "/etc/rc.d/rc.inet1: /sbin/ifconfig lo down" | $LOGGER
<BR> /sbin/ifconfig lo down
<BR> fi
<BR>}
<BR>
<BR>######################
<BR># SCHEDA PCMCIA #
<BR>######################
<BR>
<BR># Funzioni per attivare la scheda wireless pcmcia
<BR>ath_up() {
<BR> # If the interface isn´t in the kernel yet (but there´s an alias for it in
<BR> # modules.conf), then it should be loaded first:
<BR> if ! grep ath${1}: /proc/net/dev 1> /dev/null ; then # no interface yet
<BR> if /sbin/modprobe -c | grep -w "alias ath${1}" | grep -vw "alias ath${1} off" > /dev/null ; then
<BR> echo "/etc/rc.d/rc.inet1: /sbin/modprobe ath${1}" | $LOGGER
<BR> /sbin/modprobe ath${1}
<BR> fi
<BR> fi
<BR> if grep ath${1}: /proc/net/dev 1> /dev/null ; then # interface exists
<BR> if ! /sbin/ifconfig | grep -w "ath${1}" 1>/dev/null || \
<BR> ! /sbin/ifconfig ath${1} | grep "inet addr" 1> /dev/null ; then # interface not up or not configured
<BR> if [ -x /etc/rc.d/rc.wireless ]; then
<BR> . /etc/rc.d/rc.wireless ath${1} # Initialize any wireless parameters
<BR> fi
<BR> if [ "${USE_DHCP[$1]}" = "yes" ]; then # use DHCP to bring interface up
<BR> if [ ! "${DHCP_HOSTNAME[$1]}" = "" ]; then
<BR> echo "/etc/rc.d/rc.inet1: /sbin/dhcpcd -d -t 10 -h ${DHCP_HOSTNAME[$1]} ath${1}" | $LOGGER
<BR> /sbin/dhcpcd -d -t 10 -h ${DHCP_HOSTNAME[$1]} ath${1}
<BR> else
<BR> echo "/etc/rc.d/rc.inet1: /sbin/dhcpcd -d -t 10 ath${1}" | $LOGGER
<BR> /sbin/dhcpcd -d -t 10 ath${1}
<BR> fi
<BR> else # bring up interface using a static IP address
<BR> if [ ! "${IPADDR[$1]}" = "" ]; then # skip unconfigured interfaces
<BR> # Determine broadcast address from the IP address and netmask:
<BR> BROADCAST=`/bin/ipmask ${NETMASK[$1]} ${IPADDR[$1]} | cut -f 1 -d ´ ´`
<BR> # Set up the athernet card:
<BR> echo "/etc/rc.d/rc.inet1: /sbin/ifconfig ath${1} ${IPADDR[$1]} broadcast ${BROADCAST} netmask ${NETMASK[$1]}" | $LOGGER
<BR> /sbin/ifconfig ath${1} ${IPADDR[$1]} broadcast ${BROADCAST} netmask ${NETMASK[$1]}
<BR> else
<BR> if [ "$DEBUG_ETH_UP" = "yes" ]; then
<BR> echo "/etc/rc.d/rc.inet1: ath${1} interface is not configured in /etc/rc.d/rc.inet1.conf" | $LOGGER
<BR> fi
<BR> fi
<BR> fi
<BR> else
<BR> if [ "$DEBUG_ETH_UP" = "yes" ]; then
<BR> echo "/etc/rc.d/rc.inet1: ath${1} is already up, skipping" | $LOGGER
<BR> fi
<BR> fi
<BR> else
<BR> if [ "$DEBUG_ETH_UP" = "yes" ]; then
<BR> echo "/etc/rc.d/rc.inet1: ath${1} interface does not exist (yet)" | $LOGGER
<BR> fi
<BR> fi
<BR>}
<BR>
<BR># Function to take down an Ethernet interface:
<BR>ath_down() {
<BR> if grep ath${1}: /proc/net/dev 1> /dev/null ; then
<BR> if [ "${USE_DHCP[$1]}" = "yes" ]; then
<BR> echo "/etc/rc.d/rc.inet1: /sbin/dhcpcd -k -d ath${1}" | $LOGGER
<BR> /sbin/dhcpcd -k -d ath${1} || /sbin/ifconfig ath${1} down
<BR> sleep 1
<BR> else
<BR> echo "/etc/rc.d/rc.inet1: /sbin/ifconfig ath${1} down" | $LOGGER
<BR> /sbin/ifconfig ath${1} down
<BR> fi
<BR> fi
<BR>}
<BR>
<BR>
<BR>######################
<BR># ETHERNET FUNCTIONS #
<BR>######################
<BR>
<BR># Function to bring up an Ethernet interface. If the interface is
<BR># already up or does not yet exist (perhaps because the kernel driver
<BR># is not loaded yet), do nothing.
<BR>eth_up() {
<BR> # If the interface isn´t in the kernel yet (but there´s an alias for it in
<BR> # modules.conf), then it should be loaded first:
<BR> if ! grep eth${1}: /proc/net/dev 1> /dev/null ; then # no interface yet
<BR> if /sbin/modprobe -c | grep -w "alias eth${1}" | grep -vw "alias eth${1} off" > /dev/null ; then
<BR> echo "/etc/rc.d/rc.inet1: /sbin/modprobe eth${1}" | $LOGGER
<BR> /sbin/modprobe eth${1}
<BR> fi
<BR> fi
<BR> if grep eth${1}: /proc/net/dev 1> /dev/null ; then # interface exists
<BR> if ! /sbin/ifconfig | grep -w "eth${1}" 1>/dev/null || \
<BR> ! /sbin/ifconfig eth${1} | grep "inet addr" 1> /dev/null ; then # interface not up or not configured
<BR> if [ -x /etc/rc.d/rc.wireless ]; then
<BR> . /etc/rc.d/rc.wireless eth${1} # Initialize any wireless parameters
<BR> fi
<BR> if [ "${USE_DHCP[$1]}" = "yes" ]; then # use DHCP to bring interface up
<BR> if [ ! "${DHCP_HOSTNAME[$1]}" = "" ]; then
<BR> echo "/etc/rc.d/rc.inet1: /sbin/dhcpcd -d -t 10 -h ${DHCP_HOSTNAME[$1]} eth${1}" | $LOGGER
<BR> /sbin/dhcpcd -d -t 10 -h ${DHCP_HOSTNAME[$1]} eth${1}
<BR> else
<BR> echo "/etc/rc.d/rc.inet1: /sbin/dhcpcd -d -t 10 eth${1}" | $LOGGER
<BR> /sbin/dhcpcd -d -t 10 eth${1}
<BR> fi
<BR> else # bring up interface using a static IP address
<BR> if [ ! "${IPADDR[$1]}" = "" ]; then # skip unconfigured interfaces
<BR> # Determine broadcast address from the IP address and netmask:
<BR> BROADCAST=`/bin/ipmask ${NETMASK[$1]} ${IPADDR[$1]} | cut -f 1 -d ´ ´`
<BR> # Set up the ethernet card:
<BR> echo "/etc/rc.d/rc.inet1: /sbin/ifconfig eth${1} ${IPADDR[$1]} broadcast ${BROADCAST} netmask ${NETMASK[$1]}" | $LOGGER
<BR> /sbin/ifconfig eth${1} ${IPADDR[$1]} broadcast ${BROADCAST} netmask ${NETMASK[$1]}
<BR> else
<BR> if [ "$DEBUG_ETH_UP" = "yes" ]; then
<BR> echo "/etc/rc.d/rc.inet1: eth${1} interface is not configured in /etc/rc.d/rc.inet1.conf" | $LOGGER
<BR> fi
<BR> fi
<BR> fi
<BR> else
<BR> if [ "$DEBUG_ETH_UP" = "yes" ]; then
<BR> echo "/etc/rc.d/rc.inet1: eth${1} is already up, skipping" | $LOGGER
<BR> fi
<BR> fi
<BR> else
<BR> if [ "$DEBUG_ETH_UP" = "yes" ]; then
<BR> echo "/etc/rc.d/rc.inet1: eth${1} interface does not exist (yet)" | $LOGGER
<BR> fi
<BR> fi
<BR>}
<BR>
<BR># Function to take down an Ethernet interface:
<BR>eth_down() {
<BR> if grep eth${1}: /proc/net/dev 1> /dev/null ; then
<BR> if [ "${USE_DHCP[$1]}" = "yes" ]; then
<BR> echo "/etc/rc.d/rc.inet1: /sbin/dhcpcd -k -d eth${1}" | $LOGGER
<BR> /sbin/dhcpcd -k -d eth${1} || /sbin/ifconfig eth${1} down
<BR> sleep 1
<BR> else
<BR> echo "/etc/rc.d/rc.inet1: /sbin/ifconfig eth${1} down" | $LOGGER
<BR> /sbin/ifconfig eth${1} down
<BR> fi
<BR> fi
<BR>}
<BR>
<BR>#####################
<BR># GATEWAY FUNCTIONS #
<BR>#####################
<BR>
<BR># Function to bring up the gateway if there is not yet a default route:
<BR>gateway_up() {
<BR> if ! /sbin/route -n | grep "^0.0.0.0" 1> /dev/null ; then
<BR> if [ ! "$GATEWAY" = "" ]; then
<BR> echo "/etc/rc.d/rc.inet1: /sbin/route add default gw ${GATEWAY} metric 1" | $LOGGER
<BR> /sbin/route add default gw ${GATEWAY} metric 1 2>&1 | $LOGGER
<BR> fi
<BR> fi
<BR>}
<BR>
<BR># Function to take down an existing default gateway:
<BR>gateway_down() {
<BR> if /sbin/route -n | grep "^0.0.0.0" 1> /dev/null ; then
<BR> echo "/etc/rc.d/rc.inet1: /sbin/route del default" | $LOGGER
<BR> /sbin/route del default
<BR> fi
<BR>}
<BR>
<BR>############
<BR>### MAIN ###
<BR>############
<BR>
<BR>case "$1" in
<BR>´start´) # "start" brings up all available interfaces:
<BR> lo_up
<BR> ath_up 0
<BR> eth_up 0
<BR> eth_up 1
<BR> eth_up 2
<BR> eth_up 3
<BR> gateway_up
<BR> ;;
<BR>´stop´) # "stop" takes down all existing interfaces:
<BR> gateway_down
<BR> eth_down 3
<BR> eth_down 2
<BR> eth_down 1
<BR> eth_down 0
<BR> ath_down 0
<BR> lo_down
<BR> ;;
<BR>ath?_start) # "ath?_start" will start the specified interface
<BR> INUM=`echo $1 | /bin/cut -c 4`
<BR> ath_up $INUM
<BR> ;;
<BR>ath?_stop) # "ath?_stop" will stop the specified interface
<BR> INUM=`echo $1 | /bin/cut -c 4`
<BR> ath_down $INUM
<BR> ;;
<BR>ath?_restart) # "ath?_restart" will take the specified interface down and up again
<BR> INUM=`echo $1 | /bin/cut -c 4`
<BR> ath_down $INUM
<BR> ath_up $INUM
<BR> ;;
<BR>eth?_start) # "eth?_start" will start the specified interface
<BR> INUM=`echo $1 | /bin/cut -c 4`
<BR> eth_up $INUM
<BR> ;;
<BR>eth?_stop) # "eth?_stop" will stop the specified interface
<BR> INUM=`echo $1 | /bin/cut -c 4`
<BR> eth_down $INUM
<BR> ;;
<BR>eth?_restart) # "eth?_restart" will take the specified interface down and up again
<BR> INUM=`echo $1 | /bin/cut -c 4`
<BR> eth_down $INUM
<BR> eth_up $INUM
<BR> ;;
<BR>*) # The default is to bring up all interfaces:
<BR> lo_up
<BR> ath_up 0
<BR> eth_up 0
<BR> eth_up 1
<BR> eth_up 2
<BR> eth_up 3
<BR> gateway_up
<BR>esac
<BR>
<BR># End of /etc/rc.d/rc.inet1
<BR><br>
<BR>
<BR>Comunque, Stefano, grazie lo stesso per il suggerimento...
<BR>
<BR>Dopo la mia modifica rc.inet1 risulta cosi´:
<BR>--------------------------------------------------------------------------------------
<BR>#! /bin/sh
<BR># /etc/rc.d/rc.inet1
<BR># This script is used to bring up the various network interfaces.
<BR>#
<BR># @(#)/etc/rc.d/rc.inet1 10.0 Sun Jun 6 23:42:32 PDT 2004 (pjv)
<BR>
<BR>############################
<BR># READ NETWORK CONFIG FILE #
<BR>############################
<BR>
<BR># Get the configuration information from /etc/rc.d/rc.inet1.conf:
<BR>. /etc/rc.d/rc.inet1.conf
<BR>
<BR>###########
<BR># LOGGING #
<BR>###########
<BR>
<BR># If possible, log events in /var/log/messages:
<BR>if [ /var/run/syslogd.pid -a -x /usr/bin/logger ]; then
<BR> LOGGER=/usr/bin/logger
<BR>else # output to stdout/stderr:
<BR> LOGGER=/bin/cat
<BR>fi
<BR>
<BR>######################
<BR># LOOPBACK FUNCTIONS #
<BR>######################
<BR>
<BR># Function to bring up the loopback interface. If loopback is
<BR># already up, do nothing.
<BR>lo_up() {
<BR> if grep lo: /proc/net/dev 1> /dev/null ; then
<BR> if ! /sbin/ifconfig | grep "^lo" 1> /dev/null ; then
<BR> echo "/etc/rc.d/rc.inet1: /sbin/ifconfig lo 127.0.0.1" | $LOGGER
<BR> /sbin/ifconfig lo 127.0.0.1
<BR> echo "/etc/rc.d/rc.inet1: /sbin/route add -net 127.0.0.0 netmask 255.0.0.0 lo" | $LOGGER
<BR> /sbin/route add -net 127.0.0.0 netmask 255.0.0.0 lo
<BR> fi
<BR> fi
<BR>}
<BR>
<BR># Function to take down the loopback interface:
<BR>lo_down() {
<BR> if grep lo: /proc/net/dev 1> /dev/null ; then
<BR> echo "/etc/rc.d/rc.inet1: /sbin/ifconfig lo down" | $LOGGER
<BR> /sbin/ifconfig lo down
<BR> fi
<BR>}
<BR>
<BR>######################
<BR># SCHEDA PCMCIA #
<BR>######################
<BR>
<BR># Funzioni per attivare la scheda wireless pcmcia
<BR>ath_up() {
<BR> # If the interface isn´t in the kernel yet (but there´s an alias for it in
<BR> # modules.conf), then it should be loaded first:
<BR> if ! grep ath${1}: /proc/net/dev 1> /dev/null ; then # no interface yet
<BR> if /sbin/modprobe -c | grep -w "alias ath${1}" | grep -vw "alias ath${1} off" > /dev/null ; then
<BR> echo "/etc/rc.d/rc.inet1: /sbin/modprobe ath${1}" | $LOGGER
<BR> /sbin/modprobe ath${1}
<BR> fi
<BR> fi
<BR> if grep ath${1}: /proc/net/dev 1> /dev/null ; then # interface exists
<BR> if ! /sbin/ifconfig | grep -w "ath${1}" 1>/dev/null || \
<BR> ! /sbin/ifconfig ath${1} | grep "inet addr" 1> /dev/null ; then # interface not up or not configured
<BR> if [ -x /etc/rc.d/rc.wireless ]; then
<BR> . /etc/rc.d/rc.wireless ath${1} # Initialize any wireless parameters
<BR> fi
<BR> if [ "${USE_DHCP[$1]}" = "yes" ]; then # use DHCP to bring interface up
<BR> if [ ! "${DHCP_HOSTNAME[$1]}" = "" ]; then
<BR> echo "/etc/rc.d/rc.inet1: /sbin/dhcpcd -d -t 10 -h ${DHCP_HOSTNAME[$1]} ath${1}" | $LOGGER
<BR> /sbin/dhcpcd -d -t 10 -h ${DHCP_HOSTNAME[$1]} ath${1}
<BR> else
<BR> echo "/etc/rc.d/rc.inet1: /sbin/dhcpcd -d -t 10 ath${1}" | $LOGGER
<BR> /sbin/dhcpcd -d -t 10 ath${1}
<BR> fi
<BR> else # bring up interface using a static IP address
<BR> if [ ! "${IPADDR[$1]}" = "" ]; then # skip unconfigured interfaces
<BR> # Determine broadcast address from the IP address and netmask:
<BR> BROADCAST=`/bin/ipmask ${NETMASK[$1]} ${IPADDR[$1]} | cut -f 1 -d ´ ´`
<BR> # Set up the athernet card:
<BR> echo "/etc/rc.d/rc.inet1: /sbin/ifconfig ath${1} ${IPADDR[$1]} broadcast ${BROADCAST} netmask ${NETMASK[$1]}" | $LOGGER
<BR> /sbin/ifconfig ath${1} ${IPADDR[$1]} broadcast ${BROADCAST} netmask ${NETMASK[$1]}
<BR> else
<BR> if [ "$DEBUG_ETH_UP" = "yes" ]; then
<BR> echo "/etc/rc.d/rc.inet1: ath${1} interface is not configured in /etc/rc.d/rc.inet1.conf" | $LOGGER
<BR> fi
<BR> fi
<BR> fi
<BR> else
<BR> if [ "$DEBUG_ETH_UP" = "yes" ]; then
<BR> echo "/etc/rc.d/rc.inet1: ath${1} is already up, skipping" | $LOGGER
<BR> fi
<BR> fi
<BR> else
<BR> if [ "$DEBUG_ETH_UP" = "yes" ]; then
<BR> echo "/etc/rc.d/rc.inet1: ath${1} interface does not exist (yet)" | $LOGGER
<BR> fi
<BR> fi
<BR>}
<BR>
<BR># Function to take down an Ethernet interface:
<BR>ath_down() {
<BR> if grep ath${1}: /proc/net/dev 1> /dev/null ; then
<BR> if [ "${USE_DHCP[$1]}" = "yes" ]; then
<BR> echo "/etc/rc.d/rc.inet1: /sbin/dhcpcd -k -d ath${1}" | $LOGGER
<BR> /sbin/dhcpcd -k -d ath${1} || /sbin/ifconfig ath${1} down
<BR> sleep 1
<BR> else
<BR> echo "/etc/rc.d/rc.inet1: /sbin/ifconfig ath${1} down" | $LOGGER
<BR> /sbin/ifconfig ath${1} down
<BR> fi
<BR> fi
<BR>}
<BR>
<BR>
<BR>######################
<BR># ETHERNET FUNCTIONS #
<BR>######################
<BR>
<BR># Function to bring up an Ethernet interface. If the interface is
<BR># already up or does not yet exist (perhaps because the kernel driver
<BR># is not loaded yet), do nothing.
<BR>eth_up() {
<BR> # If the interface isn´t in the kernel yet (but there´s an alias for it in
<BR> # modules.conf), then it should be loaded first:
<BR> if ! grep eth${1}: /proc/net/dev 1> /dev/null ; then # no interface yet
<BR> if /sbin/modprobe -c | grep -w "alias eth${1}" | grep -vw "alias eth${1} off" > /dev/null ; then
<BR> echo "/etc/rc.d/rc.inet1: /sbin/modprobe eth${1}" | $LOGGER
<BR> /sbin/modprobe eth${1}
<BR> fi
<BR> fi
<BR> if grep eth${1}: /proc/net/dev 1> /dev/null ; then # interface exists
<BR> if ! /sbin/ifconfig | grep -w "eth${1}" 1>/dev/null || \
<BR> ! /sbin/ifconfig eth${1} | grep "inet addr" 1> /dev/null ; then # interface not up or not configured
<BR> if [ -x /etc/rc.d/rc.wireless ]; then
<BR> . /etc/rc.d/rc.wireless eth${1} # Initialize any wireless parameters
<BR> fi
<BR> if [ "${USE_DHCP[$1]}" = "yes" ]; then # use DHCP to bring interface up
<BR> if [ ! "${DHCP_HOSTNAME[$1]}" = "" ]; then
<BR> echo "/etc/rc.d/rc.inet1: /sbin/dhcpcd -d -t 10 -h ${DHCP_HOSTNAME[$1]} eth${1}" | $LOGGER
<BR> /sbin/dhcpcd -d -t 10 -h ${DHCP_HOSTNAME[$1]} eth${1}
<BR> else
<BR> echo "/etc/rc.d/rc.inet1: /sbin/dhcpcd -d -t 10 eth${1}" | $LOGGER
<BR> /sbin/dhcpcd -d -t 10 eth${1}
<BR> fi
<BR> else # bring up interface using a static IP address
<BR> if [ ! "${IPADDR[$1]}" = "" ]; then # skip unconfigured interfaces
<BR> # Determine broadcast address from the IP address and netmask:
<BR> BROADCAST=`/bin/ipmask ${NETMASK[$1]} ${IPADDR[$1]} | cut -f 1 -d ´ ´`
<BR> # Set up the ethernet card:
<BR> echo "/etc/rc.d/rc.inet1: /sbin/ifconfig eth${1} ${IPADDR[$1]} broadcast ${BROADCAST} netmask ${NETMASK[$1]}" | $LOGGER
<BR> /sbin/ifconfig eth${1} ${IPADDR[$1]} broadcast ${BROADCAST} netmask ${NETMASK[$1]}
<BR> else
<BR> if [ "$DEBUG_ETH_UP" = "yes" ]; then
<BR> echo "/etc/rc.d/rc.inet1: eth${1} interface is not configured in /etc/rc.d/rc.inet1.conf" | $LOGGER
<BR> fi
<BR> fi
<BR> fi
<BR> else
<BR> if [ "$DEBUG_ETH_UP" = "yes" ]; then
<BR> echo "/etc/rc.d/rc.inet1: eth${1} is already up, skipping" | $LOGGER
<BR> fi
<BR> fi
<BR> else
<BR> if [ "$DEBUG_ETH_UP" = "yes" ]; then
<BR> echo "/etc/rc.d/rc.inet1: eth${1} interface does not exist (yet)" | $LOGGER
<BR> fi
<BR> fi
<BR>}
<BR>
<BR># Function to take down an Ethernet interface:
<BR>eth_down() {
<BR> if grep eth${1}: /proc/net/dev 1> /dev/null ; then
<BR> if [ "${USE_DHCP[$1]}" = "yes" ]; then
<BR> echo "/etc/rc.d/rc.inet1: /sbin/dhcpcd -k -d eth${1}" | $LOGGER
<BR> /sbin/dhcpcd -k -d eth${1} || /sbin/ifconfig eth${1} down
<BR> sleep 1
<BR> else
<BR> echo "/etc/rc.d/rc.inet1: /sbin/ifconfig eth${1} down" | $LOGGER
<BR> /sbin/ifconfig eth${1} down
<BR> fi
<BR> fi
<BR>}
<BR>
<BR>#####################
<BR># GATEWAY FUNCTIONS #
<BR>#####################
<BR>
<BR># Function to bring up the gateway if there is not yet a default route:
<BR>gateway_up() {
<BR> if ! /sbin/route -n | grep "^0.0.0.0" 1> /dev/null ; then
<BR> if [ ! "$GATEWAY" = "" ]; then
<BR> echo "/etc/rc.d/rc.inet1: /sbin/route add default gw ${GATEWAY} metric 1" | $LOGGER
<BR> /sbin/route add default gw ${GATEWAY} metric 1 2>&1 | $LOGGER
<BR> fi
<BR> fi
<BR>}
<BR>
<BR># Function to take down an existing default gateway:
<BR>gateway_down() {
<BR> if /sbin/route -n | grep "^0.0.0.0" 1> /dev/null ; then
<BR> echo "/etc/rc.d/rc.inet1: /sbin/route del default" | $LOGGER
<BR> /sbin/route del default
<BR> fi
<BR>}
<BR>
<BR>############
<BR>### MAIN ###
<BR>############
<BR>
<BR>case "$1" in
<BR>´start´) # "start" brings up all available interfaces:
<BR> lo_up
<BR> ath_up 0
<BR> eth_up 0
<BR> eth_up 1
<BR> eth_up 2
<BR> eth_up 3
<BR> gateway_up
<BR> ;;
<BR>´stop´) # "stop" takes down all existing interfaces:
<BR> gateway_down
<BR> eth_down 3
<BR> eth_down 2
<BR> eth_down 1
<BR> eth_down 0
<BR> ath_down 0
<BR> lo_down
<BR> ;;
<BR>ath?_start) # "ath?_start" will start the specified interface
<BR> INUM=`echo $1 | /bin/cut -c 4`
<BR> ath_up $INUM
<BR> ;;
<BR>ath?_stop) # "ath?_stop" will stop the specified interface
<BR> INUM=`echo $1 | /bin/cut -c 4`
<BR> ath_down $INUM
<BR> ;;
<BR>ath?_restart) # "ath?_restart" will take the specified interface down and up again
<BR> INUM=`echo $1 | /bin/cut -c 4`
<BR> ath_down $INUM
<BR> ath_up $INUM
<BR> ;;
<BR>eth?_start) # "eth?_start" will start the specified interface
<BR> INUM=`echo $1 | /bin/cut -c 4`
<BR> eth_up $INUM
<BR> ;;
<BR>eth?_stop) # "eth?_stop" will stop the specified interface
<BR> INUM=`echo $1 | /bin/cut -c 4`
<BR> eth_down $INUM
<BR> ;;
<BR>eth?_restart) # "eth?_restart" will take the specified interface down and up again
<BR> INUM=`echo $1 | /bin/cut -c 4`
<BR> eth_down $INUM
<BR> eth_up $INUM
<BR> ;;
<BR>*) # The default is to bring up all interfaces:
<BR> lo_up
<BR> ath_up 0
<BR> eth_up 0
<BR> eth_up 1
<BR> eth_up 2
<BR> eth_up 3
<BR> gateway_up
<BR>esac
<BR>
<BR># End of /etc/rc.d/rc.inet1
<BR><br>
Domanda per veri esperti! Cambiare nome alla scheda wireless
<!-- BBCode Quote Start --><TABLE BORDER=0 ALIGN=CENTER WIDTH=85%><TR><TD><font size=-1>Quote:</font><HR></TD></TR><TR><TD><FONT SIZE=-1><BLOCKQUOTE> case "$1" in
<BR>´start´) # "start" brings up all available interfaces:
<BR>lo_up
<BR>ath_up 0
<BR>eth_up 0
<BR>eth_up 1
<BR>eth_up 2
<BR>eth_up 3
<BR>gateway_up
<BR>;;
<BR>
<BR>[...]
<BR>
<BR>*) # The default is to bring up all interfaces:
<BR>lo_up
<BR>ath_up 0
<BR>eth_up 0
<BR>eth_up 1
<BR>eth_up 2
<BR>eth_up 3
<BR>gateway_up
<BR> </BLOCKQUOTE></FONT></TD></TR><TR><TD><HR></TD></TR></TABLE><!-- BBCode Quote End -->
<BR>
<BR>le righe con ath prova a metterle dopo quelle con eth, in maniera di avere qualcosa del genere:
<BR>
<BR><!-- BBCode Quote Start --><TABLE BORDER=0 ALIGN=CENTER WIDTH=85%><TR><TD><font size=-1>Quote:</font><HR></TD></TR><TR><TD><FONT SIZE=-1><BLOCKQUOTE> case "$1" in
<BR>´start´) # "start" brings up all available interfaces:
<BR>lo_up
<BR>eth_up 0
<BR>eth_up 1
<BR>eth_up 2
<BR>eth_up 3
<BR>ath_up 0
<BR>gateway_up
<BR>;;
<BR>
<BR>[...]
<BR>
<BR>*) # The default is to bring up all interfaces:
<BR>lo_up
<BR>eth_up 0
<BR>eth_up 1
<BR>eth_up 2
<BR>eth_up 3
<BR>ath_up 0
<BR>gateway_up </BLOCKQUOTE></FONT></TD></TR><TR><TD><HR></TD></TR></TABLE><!-- BBCode Quote End -->
<BR>
<BR>ciao, rob<BR><BR>[ Questo Messaggio è stato Modificato da: rob il 04-02-2005 20:55 ]<br>
<BR>´start´) # "start" brings up all available interfaces:
<BR>lo_up
<BR>ath_up 0
<BR>eth_up 0
<BR>eth_up 1
<BR>eth_up 2
<BR>eth_up 3
<BR>gateway_up
<BR>;;
<BR>
<BR>[...]
<BR>
<BR>*) # The default is to bring up all interfaces:
<BR>lo_up
<BR>ath_up 0
<BR>eth_up 0
<BR>eth_up 1
<BR>eth_up 2
<BR>eth_up 3
<BR>gateway_up
<BR> </BLOCKQUOTE></FONT></TD></TR><TR><TD><HR></TD></TR></TABLE><!-- BBCode Quote End -->
<BR>
<BR>le righe con ath prova a metterle dopo quelle con eth, in maniera di avere qualcosa del genere:
<BR>
<BR><!-- BBCode Quote Start --><TABLE BORDER=0 ALIGN=CENTER WIDTH=85%><TR><TD><font size=-1>Quote:</font><HR></TD></TR><TR><TD><FONT SIZE=-1><BLOCKQUOTE> case "$1" in
<BR>´start´) # "start" brings up all available interfaces:
<BR>lo_up
<BR>eth_up 0
<BR>eth_up 1
<BR>eth_up 2
<BR>eth_up 3
<BR>ath_up 0
<BR>gateway_up
<BR>;;
<BR>
<BR>[...]
<BR>
<BR>*) # The default is to bring up all interfaces:
<BR>lo_up
<BR>eth_up 0
<BR>eth_up 1
<BR>eth_up 2
<BR>eth_up 3
<BR>ath_up 0
<BR>gateway_up </BLOCKQUOTE></FONT></TD></TR><TR><TD><HR></TD></TR></TABLE><!-- BBCode Quote End -->
<BR>
<BR>ciao, rob<BR><BR>[ Questo Messaggio è stato Modificato da: rob il 04-02-2005 20:55 ]<br>
- legionario
- Linux 3.x

- Messaggi: 603
- Iscritto il: mer 8 dic 2004, 0:00
- Località: Bergamo - Roma
Domanda per veri esperti! Cambiare nome alla scheda wireless
Grazie per l´aiuto Rob...purtroppo il risultato e´ lo stesso... :-[
<BR>
<BR>Il problema sta tutto nella mia ignoranza di C. Se solo avessi le basi del linguaggio sono sicuro che ci riuscirei...
<BR>
<BR>Saluti!!<br>
<BR>
<BR>Il problema sta tutto nella mia ignoranza di C. Se solo avessi le basi del linguaggio sono sicuro che ci riuscirei...
<BR>
<BR>Saluti!!<br>
Domanda per veri esperti! Cambiare nome alla scheda wireless
ma quello non e´ C ... solo bash
<BR>per avere una certa conoscenza di linguaggio guarda gli howto´s:
<BR><!-- BBCode Start --><A HREF="http://www.tldp.org/HOWTO/Bash-Prog-Intro-HOWTO.html" TARGET="_blank">Introduction to BASH Programming</A><!-- BBCode End -->
<BR><!-- BBCode Start --><A HREF="http://www.tldp.org/LDP/abs/html/" TARGET="_blank">Advanced BASH Scripting</A><!-- BBCode End --><br>
<BR>per avere una certa conoscenza di linguaggio guarda gli howto´s:
<BR><!-- BBCode Start --><A HREF="http://www.tldp.org/HOWTO/Bash-Prog-Intro-HOWTO.html" TARGET="_blank">Introduction to BASH Programming</A><!-- BBCode End -->
<BR><!-- BBCode Start --><A HREF="http://www.tldp.org/LDP/abs/html/" TARGET="_blank">Advanced BASH Scripting</A><!-- BBCode End --><br>
- legionario
- Linux 3.x

- Messaggi: 603
- Iscritto il: mer 8 dic 2004, 0:00
- Località: Bergamo - Roma
Domanda per veri esperti! Cambiare nome alla scheda wireless
Ah!! Mi hai aperto la mente con questa notizia!! :-]
<BR>
<BR> Grazie...forse l´impresa e´ meno complicata di quanto pensassi...
<BR>
<BR>Do un´occhiata ai manuali che mi hai suggerito..
<BR>
<BR>CIauz<br>
<BR>
<BR> Grazie...forse l´impresa e´ meno complicata di quanto pensassi...
<BR>
<BR>Do un´occhiata ai manuali che mi hai suggerito..
<BR>
<BR>CIauz<br>
Domanda per veri esperti! Cambiare nome alla scheda wireless
Guarda io avevo un problema simile col ndiswrapper che chiamava il driver wlan0..1..2.., ma dava la possivilità di cambiare il nome passando opportunamente dei parametri al modulo...
<BR>Che modulo usi per utilizzare la wireless?
<BR>
<BR>Col ndiswrapper mi è bastato mettere nel modules.conf
<BR>
<BR><!-- BBCode Start --><I>alias eth1 ndiswrapper
<BR>options eth1 if_name=eth1</I><!-- BBCode End -->
<BR>
<BR>e tutto si è aggiustato.. (la eth0 è la scheda di rete wired e la eth1 la wireless).
<BR>
<BR><br>
<BR>Che modulo usi per utilizzare la wireless?
<BR>
<BR>Col ndiswrapper mi è bastato mettere nel modules.conf
<BR>
<BR><!-- BBCode Start --><I>alias eth1 ndiswrapper
<BR>options eth1 if_name=eth1</I><!-- BBCode End -->
<BR>
<BR>e tutto si è aggiustato.. (la eth0 è la scheda di rete wired e la eth1 la wireless).
<BR>
<BR><br>
- legionario
- Linux 3.x

- Messaggi: 603
- Iscritto il: mer 8 dic 2004, 0:00
- Località: Bergamo - Roma
Domanda per veri esperti! Cambiare nome alla scheda wireless
Grazie per l´aiuto Kyakan. In effetti il tuo suggerimento e´ piu´ che valido. Se riuscissi a cambiare nome alla scheda da /etc/modprobe.conf risolverei la questione! Ho potuto verificare in google che la quasi totalita´ delle persone che vogliono cambiare nome alla propria scheda utilizza questo metodo...
<BR>
<BR>Ma a me non funziona!!!
<BR>
<BR>Considerando che il modulo di madwifi e´ ath_pci ho inserito in /etc/modprobe.conf le seguenti righe:
<BR>-----------------------------------------------------
<BR>alias eth1 ath_pci
<BR>options eth1 if_name=eth1
<BR>-----------------------------------------------------
<BR>
<BR>Ma non succede nulla! Se vado a controllare in /var/log/messages ho il seguente output:
<BR>--------------------------------------------------------------------
<BR>legionario logger: /etc/rc.d/rc.inet1: /sbin/modprobe eth1
<BR>-------------------------------------------------------------------
<BR>
<BR>In google avevo trovato, tra l´altro, il suggerimento di un tizio che sembrava facesse al caso mio:
<BR>----------------------------------------------------------------------------------------
<BR>install <name of installed module or its alias> ip link set <real name of interface, as chosen by module> name <desired name>
<BR>
<BR>To rename "wlan1" to "eth3", for example, using the e100 driver aliased to "wireless":
<BR> ---------------------------------------------------------------------------------------
<BR>
<BR>Cosi´ ho messo in modprobe.conf la seguente riga:
<BR>----------------------------------------------------------
<BR>install ath_pci ip link set ath0 name eth1
<BR>------------------------------------------------------------
<BR>
<BR>Dopo il riavvio la scheda ath0 non esisteva piu´, quindi anche questa metodo e´ stato scartato...
<BR>
<BR>Ma a questo punto mi chiedo: e´ mai possibile che non si riesca a cambiare nome a una banalissima scheda? Mi sembra incredibile questa cosa...cioe´...non ci puo´ essere nessuna spiegazione!! Mi sono quasi esaurito! Sono giorni e giorni che sbatto il muso su questo problema!
<BR>
<BR>Saluti!<br>
<BR>
<BR>Ma a me non funziona!!!
<BR>
<BR>Considerando che il modulo di madwifi e´ ath_pci ho inserito in /etc/modprobe.conf le seguenti righe:
<BR>-----------------------------------------------------
<BR>alias eth1 ath_pci
<BR>options eth1 if_name=eth1
<BR>-----------------------------------------------------
<BR>
<BR>Ma non succede nulla! Se vado a controllare in /var/log/messages ho il seguente output:
<BR>--------------------------------------------------------------------
<BR>legionario logger: /etc/rc.d/rc.inet1: /sbin/modprobe eth1
<BR>-------------------------------------------------------------------
<BR>
<BR>In google avevo trovato, tra l´altro, il suggerimento di un tizio che sembrava facesse al caso mio:
<BR>----------------------------------------------------------------------------------------
<BR>install <name of installed module or its alias> ip link set <real name of interface, as chosen by module> name <desired name>
<BR>
<BR>To rename "wlan1" to "eth3", for example, using the e100 driver aliased to "wireless":
<BR> ---------------------------------------------------------------------------------------
<BR>
<BR>Cosi´ ho messo in modprobe.conf la seguente riga:
<BR>----------------------------------------------------------
<BR>install ath_pci ip link set ath0 name eth1
<BR>------------------------------------------------------------
<BR>
<BR>Dopo il riavvio la scheda ath0 non esisteva piu´, quindi anche questa metodo e´ stato scartato...
<BR>
<BR>Ma a questo punto mi chiedo: e´ mai possibile che non si riesca a cambiare nome a una banalissima scheda? Mi sembra incredibile questa cosa...cioe´...non ci puo´ essere nessuna spiegazione!! Mi sono quasi esaurito! Sono giorni e giorni che sbatto il muso su questo problema!
<BR>
<BR>Saluti!<br>
- twister
- Staff

- Messaggi: 1599
- Iscritto il: mar 11 nov 2003, 0:00
- Slackware: current
- Località: Roma
- Contatta:
Domanda per veri esperti! Cambiare nome alla scheda wireless
Ti faccio una domanda stupida ma stuuupida, ma la tua eth0 ti prende poi il dhcp?
<BR>Cioè ho visto che tutte e 2 le schede devono andare up con il dhcp, ora io capisco poco e niente su questo protocollo, e mi domando, se c´è una richiesta soddisfatta di dhcp su una periferica (la tua wireless) è possibile che venga tirata su una eth sempre in dhcp sulla stessa macchina? Ti ripeto non conosco il protocollo approfonditamente ma a rigor di logica dallo stesso server dhcp non credo si possano tirar su 2 dispositivi in contemporanea.
<BR>Poi magari sbaglio :-Y <br>
<BR>Cioè ho visto che tutte e 2 le schede devono andare up con il dhcp, ora io capisco poco e niente su questo protocollo, e mi domando, se c´è una richiesta soddisfatta di dhcp su una periferica (la tua wireless) è possibile che venga tirata su una eth sempre in dhcp sulla stessa macchina? Ti ripeto non conosco il protocollo approfonditamente ma a rigor di logica dallo stesso server dhcp non credo si possano tirar su 2 dispositivi in contemporanea.
<BR>Poi magari sbaglio :-Y <br>
- legionario
- Linux 3.x

- Messaggi: 603
- Iscritto il: mer 8 dic 2004, 0:00
- Località: Bergamo - Roma
Domanda per veri esperti! Cambiare nome alla scheda wireless
Mmmh...il tuo ragionamento potrebbe essere valido twister...quindi cosa dovrei fare? Tolgo i riferimenti a dhcp relativi alla eth in rc.inet1? Questo non mi corromperebbe la struttura del file?
<BR>
<BR>Grazie per il suggerimento...provo a fare qualche modifica e ti faccio sapere...
<BR>
<BR>Ciauz<br>
<BR>
<BR>Grazie per il suggerimento...provo a fare qualche modifica e ti faccio sapere...
<BR>
<BR>Ciauz<br>
- legionario
- Linux 3.x

- Messaggi: 603
- Iscritto il: mer 8 dic 2004, 0:00
- Località: Bergamo - Roma
Domanda per veri esperti! Cambiare nome alla scheda wireless
Per ora ho abbandonato l´idea di modificare rc.inet1: l´importante e´ che la scheda mi funzioni all´avvio, per cui certe sottigliezza posso pure accantonarle finche´ non saro´ abbastanza ferrato con il linguaggio bash...
<BR>
<BR>Sono quindi andato ad aggiungere alcune righe in rc.local...in pratica voglio dire al sistema che se vede in /proc/net/dev la scheda ath0 allora me la deve attivare, quindi ho inserito queste righe:
<BR>
<BR>----------------------------------------------------------
<BR>if grep ath0: /proc/net/dev 1> /dev/null ; then
<BR> echo "attivazione scheda ath0"
<BR> /sbin/ifconfig ath0 up
<BR>fi
<BR>---------------------------------------------------------
<BR>
<BR>E fin qui tutto bene...la scheda viene attivata senza problemi, gia´ e´ qualcosa...
<BR>
<BR>Ora pero´ devo dire a rc.local di fare un´altra cosina:
<BR>
<BR>se dal comando "/sbin/iwconfig" risulta la parola "G604T_WIRELESS" ( cioe´ il mio ESSID) allora deve partire "/sbin/iwpriv ath0 mode 2" (serve per attivare la modalita´ a 11 Mb/s senza la quale ci sono difficolta´ con la connessione internet)...pertanto ho aggiunto queste righe dopo quelle di cui sopra:
<BR>
<BR>----------------------------------------------------------------------------------------
<BR>if /sbin/iwconfig |grep "G604T_WIRELESS" 1> /dev/null ; then
<BR> echo "modalita´ 802.11b 11 Mb/s..."
<BR> /sbin/iwpriv ath0 mode 2
<BR>fi
<BR>-------------------------------------------------------------------------------------
<BR>
<BR>Pero´ quando al boot vengono caricate queste righe la scheda non si attiva in
<BR>modalita´ 2 (cioe´ 11 Mb/s) e mi appare solamente questo:
<BR>
<BR>--------------------------------------------------
<BR>lo no wireless extensions.
<BR>
<BR>dummy0 no wireless extensions.
<BR>
<BR>eth0 no wireless extensions.
<BR>---------------------------------------------------
<BR>
<BR>Potreste aiutarmi a capire dove ho sbagliato? Sicuramente il problema e´ dovuto alla mia ignoranza di bash....
<BR>
<BR>Grazie ancora ragazzi per la pazienza!!
<BR>
<BR>Saluti""<br>
<BR>
<BR>Sono quindi andato ad aggiungere alcune righe in rc.local...in pratica voglio dire al sistema che se vede in /proc/net/dev la scheda ath0 allora me la deve attivare, quindi ho inserito queste righe:
<BR>
<BR>----------------------------------------------------------
<BR>if grep ath0: /proc/net/dev 1> /dev/null ; then
<BR> echo "attivazione scheda ath0"
<BR> /sbin/ifconfig ath0 up
<BR>fi
<BR>---------------------------------------------------------
<BR>
<BR>E fin qui tutto bene...la scheda viene attivata senza problemi, gia´ e´ qualcosa...
<BR>
<BR>Ora pero´ devo dire a rc.local di fare un´altra cosina:
<BR>
<BR>se dal comando "/sbin/iwconfig" risulta la parola "G604T_WIRELESS" ( cioe´ il mio ESSID) allora deve partire "/sbin/iwpriv ath0 mode 2" (serve per attivare la modalita´ a 11 Mb/s senza la quale ci sono difficolta´ con la connessione internet)...pertanto ho aggiunto queste righe dopo quelle di cui sopra:
<BR>
<BR>----------------------------------------------------------------------------------------
<BR>if /sbin/iwconfig |grep "G604T_WIRELESS" 1> /dev/null ; then
<BR> echo "modalita´ 802.11b 11 Mb/s..."
<BR> /sbin/iwpriv ath0 mode 2
<BR>fi
<BR>-------------------------------------------------------------------------------------
<BR>
<BR>Pero´ quando al boot vengono caricate queste righe la scheda non si attiva in
<BR>modalita´ 2 (cioe´ 11 Mb/s) e mi appare solamente questo:
<BR>
<BR>--------------------------------------------------
<BR>lo no wireless extensions.
<BR>
<BR>dummy0 no wireless extensions.
<BR>
<BR>eth0 no wireless extensions.
<BR>---------------------------------------------------
<BR>
<BR>Potreste aiutarmi a capire dove ho sbagliato? Sicuramente il problema e´ dovuto alla mia ignoranza di bash....
<BR>
<BR>Grazie ancora ragazzi per la pazienza!!
<BR>
<BR>Saluti""<br>

