Differences
This shows you the differences between two versions of the page.
| Next revision | Previous revision | ||
| en:guides:network-script [2010/01/25 18:54] – created pankso | en:guides:network-script [2014/11/15 20:00] (current) – updated (thanks K3nn3th) linea | ||
|---|---|---|---|
| Line 1: | Line 1: | ||
| - | ====Secrets of / | + | ====== Secrets of / |
| - | (By linea) | + | |
| - | ===Introduction=== | + | ===== Introduction |
| SliTaz launches the / | SliTaz launches the / | ||
| Line 8: | Line 7: | ||
| It's also possible to call the script when SliTaz is started, and use it to open or close internet connections. For example netbox and any software linking get-wifi-firmware (get-ipw2100-firmware, | It's also possible to call the script when SliTaz is started, and use it to open or close internet connections. For example netbox and any software linking get-wifi-firmware (get-ipw2100-firmware, | ||
| - | ===Usage=== | + | ===== Usage ===== |
| By default, / | By default, / | ||
| Line 30: | Line 29: | ||
| </ | </ | ||
| - | But, most interestingly, | + | But, most interestingly, |
| For example, we can create a directory / | For example, we can create a directory / | ||
| Line 47: | Line 46: | ||
| </ | </ | ||
| - | ===Sudo=== | + | ===== Sudo ===== |
| Since / | Since / | ||
| Line 63: | Line 62: | ||
| For user tux, which must use network.sh from every host; without a password you should add: | For user tux, which must use network.sh from every host; without a password you should add: | ||
| - | <code bash> | + | <file> |
| tux ALL=NOPASSWD: | tux ALL=NOPASSWD: | ||
| - | </code> | + | </file> |
| For user tortux, which may only get connected from localhost, and which should use a password each time, you should add: | For user tortux, which may only get connected from localhost, and which should use a password each time, you should add: | ||
| - | <code bash> | + | <file> |
| tortux my_hostname=PASSWD: | tortux my_hostname=PASSWD: | ||
| - | </code> | + | </file> |
| If you forgot your hostname, just run: | If you forgot your hostname, just run: | ||
| Line 86: | Line 85: | ||
| * :q! quit without recording. | * :q! quit without recording. | ||
| - | ===With Openbox=== | + | ===== Openbox |
| All this is not that really user friendly... | All this is not that really user friendly... | ||
| Line 98: | Line 97: | ||
| # (This script is only useful if sudo is installed, and correctly configured) | # (This script is only useful if sudo is installed, and correctly configured) | ||
| - | echo '' | + | echo '< |
| # for default file: | # for default file: | ||
| - | echo '' | + | echo '<item label=" |
| - | echo '' | + | echo -n '<action name=" |
| - | echo 'sudo / | + | echo -n "sudo / |
| - | echo '' | + | echo '</ |
| + | echo '</ | ||
| - | # for others | + | # for other configuration |
| - | for file in $(ls /etc/network/) | + | # depending on your setup): |
| - | do | + | # e.g nice for frugal installs: |
| - | echo -e "" | + | # ls /home/tux/ |
| - | echo '' | + | ls / |
| - | echo "sudo / | + | echo '< |
| - | echo '' | + | echo -n '<action name=" |
| - | done | + | echo -n "sudo / |
| + | echo '</ | ||
| + | echo '</ | ||
| + | done | ||
| # To stop connections: | # To stop connections: | ||
| - | echo '' | + | echo '<item label=" |
| - | echo '' | + | echo -n '<action name=" |
| - | echo 'sudo / | + | echo -n "sudo / |
| - | echo '' | + | echo '</ |
| + | echo '</ | ||
| - | echo '' | + | echo '</ |
| </ | </ | ||
| Line 132: | Line 136: | ||
| And now you only have to add these lines in // | And now you only have to add these lines in // | ||
| - | <code bash> | + | <file> |
| - | menu id=" | + | <menu id=" |
| execute="/ | execute="/ | ||
| - | </code> | + | </file> |
| Then reconfigure openbox: | Then reconfigure openbox: | ||
| Line 144: | Line 148: | ||
| Enjoy! | Enjoy! | ||
| + | |||
| + | ---- | ||
| + | \\ | ||
| + | ^ Page Review Section | ||
| + | |Quality| Good | | ||
| + | |Review| Minor Updates | ||
| + | |Priority| Medium | | ||
| + | |Problems| add a [[http:// | ||
| + | |::: | OR add a [[http:// | ||
| + | |How to Improve| Suggest briefly| | ||
| + | |::: | | | ||
| + | |||
| + | \\ | ||
| + | ---- | ||