Created
April 28, 2015 14:09
-
-
Save bittorf/7db7d53f56b578120d87 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/sh | |
| # detect, of we have already added an alias, | |
| # if not, do it: | |
| . /lib/functions.sh | |
| config_load network | |
| alread_added() | |
| { | |
| local config="$1" | |
| local ip="$2" | |
| test "$( uci get network.$config.ipaddr )" = "$ip" && X=true | |
| } | |
| X= | |
| config_foreach alread_added alias 10.10.43.33 | |
| [ $X ] && add_alias |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment