]> git.saurik.com Git - apple/configd.git/blobdiff - get-network-info
configd-1109.101.1.tar.gz
[apple/configd.git] / get-network-info
index e2749fdf4be2130d874ced20c5ee1b72d1e163a4..156b0c2dfc1a39f2dd25883e29d4a6035be1aa9a 100755 (executable)
@@ -1,7 +1,7 @@
 #!/bin/sh
 
 #
-#  Copyright © 2015-2019 Apple Inc.
+#  Copyright © 2015-2020 Apple Inc.
 #
 #  get-network-info
 #
@@ -162,9 +162,9 @@ run_netstat () {
                for if in ${IF_LIST}
                do
                        echo "#"                                        >> netstat.txt
-                       echo "# netstat -s -I ${if}"                    >> netstat.txt
+                       echo "# netstat -n -s -I ${if}"                 >> netstat.txt
                        echo "#"                                        >> netstat.txt
-                       /usr/sbin/netstat -s -I ${if}                   >> netstat.txt          2>&1
+                       /usr/sbin/netstat -n -s -I ${if}                >> netstat.txt          2>&1
 
                        IF_INFO=`/sbin/ifconfig -v ${if}`
                        `echo $IF_INFO | grep -q TXSTART`
@@ -281,6 +281,17 @@ run_ipconfig () {
                                echo "not available"                    >> ipconfig-info.txt
                        fi
 
+                       echo""                                          >> ipconfig-info.txt
+
+                       echo "IPv6 information:"                        >> ipconfig-info.txt
+
+                       IPCONFIG_INFO=`/usr/sbin/ipconfig getra ${if}`
+                       if [ "${IPCONFIG_INFO}" != "" ]; then
+                               echo "${IPCONFIG_INFO}"                 >> ipconfig-info.txt
+                       else
+                               echo "not available"                    >> ipconfig-info.txt
+                       fi
+
                        echo""                                          >> ipconfig-info.txt
                        ;;
                esac
@@ -466,6 +477,18 @@ collect_configuration_files () {
        fi
        if [ -e /etc/resolver ]; then
                tar -c -H /etc/resolver                                 > etc-resolver.tar              2>/dev/null
+       elif [ -e /Library/Preferences/SystemConfiguration/resolver ]; then
+               tar -c -H /Library/Preferences/SystemConfiguration/resolver > LPS-resolver.tar          2>/dev/null
+       fi
+
+       MIGRATION_FILES=$(/bin/ls -1                                                            \
+               /Library/Preferences/SystemConfiguration/preferences-pre-*.plist                \
+               /Library/Preferences/SystemConfiguration/NetworkInterfaces-pre-*.plist          \
+               2>/dev/null)
+       if [ -n "${MIGRATION_FILES}" ]; then
+               MIGRATION_FILES+=" /Library/Preferences/SystemConfiguration/preferences.plist"
+               MIGRATION_FILES+=" /Library/Preferences/SystemConfiguration/NetworkInterfaces.plist"
+               tar -c -H ${MIGRATION_FILES}                            > migration.tar                 2>/dev/null
        fi
 }
 
@@ -705,7 +728,7 @@ stop_pcap () {
        if [ ${PCAP_STARTED} -ne 0 ]; then
                trap '' SIGINT
                /usr/local/bin/netdiagnose stop sysdiagpcap                                     2>&1    1>/dev/null
-               echo "`date +"%Y-%m-%d %H:%M:%S"`: stop_pcap done"      >> get-network-info.txt
+               echo "`date +"%Y-%m-%d %H:%M:%S"`: stop_pcap"           >> get-network-info.txt
        fi
 }