Skip to content

Instantly share code, notes, and snippets.

View rbgarga's full-sized avatar

Renato Botelho rbgarga

View GitHub Profile
[?2004h[?1049h[?1h=[?2004h[?12h[?12l[?25l"src/etc/inc/util.inc" 2817L, 77943C[?2004l[?2004h2415 ▸ } 
2416 ▸ return implode(',', $textArray); 
2417 } 
2418  
2419 /* Try to change a static route, if it doesn't exist, add it */ 
2420 function route_add_or_change($args) { 
2421 ▸ global $config; 
2422  
2423 ▸ 
diff --git a/src/etc/inc/util.inc b/src/etc/inc/util.inc
index db8ec7375..4bcc329bc 100644
--- a/src/etc/inc/util.inc
+++ b/src/etc/inc/util.inc
@@ -2395,7 +2395,8 @@ function route_add_or_change($args) {
}
/* First, try to add it */
- $_gb = exec(escapeshellcmd("/sbin/route add " . $args), $output, $rc);
+ $_gb = exec(escapeshellcmd("/sbin/route add " . $args . " 2>&1"),
#!/bin/sh
unset theirs ours
while getopts to opt; do
case ${opt} in
t)
theirs=1
;;
o)
ours=1
#!/bin/sh
unset theirs ours
while getopts to opt; do
case ${opt} in
t)
theirs=1
;;
o)
ours=1
diff --git a/src/etc/rc.linkup b/src/etc/rc.linkup
index 2078369..6179371 100755
--- a/src/etc/rc.linkup
+++ b/src/etc/rc.linkup
@@ -76,8 +76,18 @@ function handle_argument_group($iface, $argument2) {
return;
}
- $ipaddr = $config['interfaces'][$iface]['ipaddr'];
- $ip6addr = $config['interfaces'][$iface]['ipaddrv6'];
diff --git a/src/etc/rc.linkup b/src/etc/rc.linkup
index 2078369..af08387 100755
--- a/src/etc/rc.linkup
+++ b/src/etc/rc.linkup
@@ -76,8 +76,18 @@ function handle_argument_group($iface, $argument2) {
return;
}
- $ipaddr = $config['interfaces'][$iface]['ipaddr'];
- $ip6addr = $config['interfaces'][$iface]['ipaddrv6'];
diff --git a/src/etc/rc.linkup b/src/etc/rc.linkup
index 2078369..6f12531 100755
--- a/src/etc/rc.linkup
+++ b/src/etc/rc.linkup
@@ -76,8 +76,18 @@ function handle_argument_group($iface, $argument2) {
return;
}
- $ipaddr = $config['interfaces'][$iface]['ipaddr'];
- $ip6addr = $config['interfaces'][$iface]['ipaddrv6'];
diff --git a/src/etc/rc.linkup b/src/etc/rc.linkup
index 2078369..96618a4 100755
--- a/src/etc/rc.linkup
+++ b/src/etc/rc.linkup
@@ -76,8 +76,18 @@ function handle_argument_group($iface, $argument2) {
return;
}
- $ipaddr = $config['interfaces'][$iface]['ipaddr'];
- $ip6addr = $config['interfaces'][$iface]['ipaddrv6'];
#!/bin/sh
#
# git_checkout.sh
#
# Copyright (c) 2016 Electric Sheep Fencing, LLC. All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
#
# 1. Redistributions of source code must retain the above copyright notice,
diff --git a/src/usr/local/www/status_dhcpv6_leases.php b/src/usr/local/www/status_dhcpv6_leases.php
index 2392f48..d4e1933 100644
--- a/src/usr/local/www/status_dhcpv6_leases.php
+++ b/src/usr/local/www/status_dhcpv6_leases.php
@@ -180,14 +180,23 @@ function parse_duid($duid_string) {
}
$awk = "/usr/bin/awk";
+$sed = "/usr/bin/sed";
+