diff --git a/bash.go b/bash.go index 6daacec..2f4b8ca 100644 --- a/bash.go +++ b/bash.go @@ -53,6 +53,7 @@ func test() error { func mainBash() { if err := test(); err != nil { + log(logError, "exit in mainBash()") exit(err) } } diff --git a/fsnotify.go b/fsnotify.go index 814c9c7..cff67b7 100644 --- a/fsnotify.go +++ b/fsnotify.go @@ -13,7 +13,8 @@ func watchSysClassNet() { // Create new watcher. watcher, err := fsnotify.NewWatcher() if err != nil { - exit(err) + log(logError, "watchSysClassNet() failed:", err) + return } defer watcher.Close() @@ -41,7 +42,8 @@ func watchSysClassNet() { // Add a path. err = watcher.Add("/tmp") if err != nil { - exit(err) + log(logError, "watchSysClassNet() watcher.Add() failed:", err) + return } // Block main goroutine forever. diff --git a/he-ipv6-tunnel.sh b/he-ipv6-tunnel.sh deleted file mode 100755 index bc95429..0000000 --- a/he-ipv6-tunnel.sh +++ /dev/null @@ -1,57 +0,0 @@ -#!/bin/bash -x - -## Tunnel ID: 818143 -# Creation Date:Feb 12, 2023 -# Description: -# IPv6 Tunnel Endpoints -# Server IPv4 Address:184.105.253.14 -# Server IPv6 Address:2001:470:1f10:2a::1/64 -# Client IPv4 Address:74.87.91.117 -# Client IPv6 Address:2001:470:1f10:2a::2/64 -# Routed IPv6 Prefixes -# Routed /64:2001:470:1f11:2a::/64 -# Routed /48:Assign /48 -# DNS Resolvers -# Anycast IPv6 Caching Nameserver:2001:470:20::2 -# Anycast IPv4 Caching Nameserver:74.82.42.42 -# DNS over HTTPS / DNS over TLS:ordns.he.net -# rDNS DelegationsEdit -# rDNS Delegated NS1: -# rDNS Delegated NS2: -# rDNS Delegated NS3: -# rDNS Delegated NS4: -# rDNS Delegated NS5: - -# ifconfig sit0 up -# ifconfig sit0 inet6 tunnel ::184.105.253.14 -# ifconfig sit1 up -# ifconfig sit1 inet6 add 2001:470:1f10:2a::2/64 -# route -A inet6 add ::/0 dev sit1 - -if [ "$1" = "down" ]; then - ip tunnel del he-ipv6 - rmmod sit - exit -fi - -if [ "$1" = "ping" ]; then - ping -c 3 2001:470:1f10:13d::1 - exit -fi - -modprobe ipv6 -ip tunnel add he-ipv6 mode sit remote 184.105.253.14 local 40.132.180.131 ttl 255 -ip link set he-ipv6 up -ip addr add 2001:470:1f10:13d::2/64 dev he-ipv6 -ip route add ::/0 dev he-ipv6 -ip -f inet6 addr -ifconfig he-ipv6 mtu 1460 - - -# old attempt from the something or pabtz hotel -# modprobe ipv6 -# ip tunnel add he-ipv6 mode sit remote 184.105.253.14 local 74.87.91.117 ttl 255 -# ip link set he-ipv6 up -# ip addr add 2001:470:1f10:2a::2/64 dev he-ipv6 -# ip route add ::/0 dev he-ipv6 -# ip -f inet6 addr diff --git a/hostname.go b/hostname.go index f035511..b4b0d42 100644 --- a/hostname.go +++ b/hostname.go @@ -22,7 +22,6 @@ func getHostname() { s, err = fqdn.FqdnHostname() if (err != nil) { log("FQDN hostname error =", err) - exit() return } if (me.fqdn != nil) { diff --git a/log.go b/log.go index 19a1d3d..aa67acf 100644 --- a/log.go +++ b/log.go @@ -25,5 +25,6 @@ func sleep(a ...any) { } func exit(a ...any) { + log(logError, "got to log() exit") witlog.Exit(a...) } diff --git a/rtnetlink.go b/rtnetlink.go index 83d2c34..4185c99 100644 --- a/rtnetlink.go +++ b/rtnetlink.go @@ -9,7 +9,8 @@ func Example_listLink() { // Dial a connection to the rtnetlink socket conn, err := rtnetlink.Dial(nil) if err != nil { - exit(err) + log(logError, "Example_listLink() failed", err) + return } defer conn.Close() diff --git a/unix.go b/unix.go index a8eb28b..09635d8 100644 --- a/unix.go +++ b/unix.go @@ -24,6 +24,7 @@ func Escalate() { cmd.Stderr = os.Stderr err := cmd.Run() if err != nil { + log(logError, "exit in Escalate()") exit(err) } } @@ -45,7 +46,7 @@ func DumpPublicDNSZone(zone string) { func dumpIPs(host string) { ips, err := net.LookupIP(host) if err != nil { - exit(err) + log(logError, "dumpIPs() failed:", err) } for _, ip := range ips { log(host, ip)