Displaying 2 results from an estimated 2 matches for "is_ip".
Did you mean:
is_id
2012 Feb 06
3
Script to automatically update externip. Useful for a host with dynamic public IP
#!/bin/bash
# checksetexternip.sh
# Author: John Cahill email at johncahill.net
# Licence: GPL v3
# Description: script that queries checkip.dyndns.com to find the server's external IP address. Updates asterisk's externip value and does a sip reload if necessary.
# Last modified 06/02/2012
is_ip(){
input=$1
octet1=$(echo $input | cut -d "." -f1)
octet2=$(echo $input | cut -d "." -f2)
octet3=$(echo $input | cut -d "." -f3)
octet4=$(echo $input | cut -d "." -f4)
stat=1
if [[ $input =~ ^[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]...
2010 Nov 10
0
[PATCH] ipconfig: parse_device nuke unused variable i
...usr/kinit/ipconfig/main.c
index b392e6a..d912f6d 100644
--- a/usr/kinit/ipconfig/main.c
+++ b/usr/kinit/ipconfig/main.c
@@ -484,7 +484,7 @@ static int add_all_devices(struct netdev *template);
static int parse_device(struct netdev *dev, const char *ip)
{
char *cp;
- int i, opt;
+ int opt;
int is_ip = 0;
dprintf("IP-Config: parse_device: \"%s\"\n", ip);
@@ -506,7 +506,7 @@ static int parse_device(struct netdev *dev, const char *ip)
dev->name = ip;
}
} else {
- for (i = opt = 0; ip && *ip; ip = cp, opt++) {
+ for (opt = 0; ip && *ip; ip = cp...