[Linuxtrent] Re: Riconfigurazione rete in Debian

  • From: Diaolin <diaolin@xxxxxxxxxxx>
  • To: linuxtrent@xxxxxxxxxxxxx
  • Date: Thu, 29 Jan 2015 17:24:12 +0100

Il 2015-01-29 12:08 Antonio Galea ha scritto:
2015-01-29 11:34 GMT+01:00 Diaolin <diaolin@xxxxxxxxxxx>:

e perché non con un semplicissimo zenity?

zenity --forms --add-entry=test --add-entry=pippo

e no digo altro

Grazie, questo è davvero comodo!

Antonio

porcheriozza:

#!/bin/bash

REPLY=$(zenity --forms --title="Indirizzi di rete" \
    --text="Configura:" \
    --separator=":" \
    --add-entry="Indirizzo IP" \
    --add-entry="Netmask" \
    --add-entry="Gateway")

echo $REPLY >/tmp/net.$$

IP=$(cat /tmp/net.$$| cut -d':' -f1)
MASK=$(cat /tmp/net.$$| cut -d':' -f3)
GW=$(cat /tmp/net.$$| cut -d':' -f3)




echo -e "# interfaces(5) file used by ifup(8) and ifdown(8)\n
auto lo
iface lo inet loopback.
\n
auto eth0
iface eth0 inet static
    address ${IP}
    netmask ${MASK}
    gateway ${GW}
">interfaces

echo "Creato file interfaces."

Diaolin



---
I'd never join a club that would allow a person like me to become a member.

[Groucho Marx]

349 66 84 215
349 72 65 081

--
Per iscriversi  (o disiscriversi), basta spedire un  messaggio con OGGETTO
"subscribe" (o "unsubscribe") a mailto:linuxtrent-request@xxxxxxxxxxxxx


Other related posts: