]> git.saurik.com Git - apple/configd.git/blobdiff - get-mobility-info
configd-888.1.2.tar.gz
[apple/configd.git] / get-mobility-info
index f802b937c779e520591151b4ee1ad7281e2e4af8..6df85fd180d66ad377b296ac5fbd0ccb9175171d 100755 (executable)
@@ -536,53 +536,22 @@ if [ -x /usr/bin/what -a -x /usr/bin/sum -a -x /bin/ls ]; then
 fi
 
 #
-# to give a chance for "networkd" and the DNS service to finish dumping their
-# state, the last thing we do is collect the logs
-#
-
-#
-# system log, kernel.log, early boot log messages
-#
-if [ -x /usr/bin/syslog ]; then
-       #
-       # save the recent activity
-       #
-       ${PRIV} /usr/bin/syslog -T local.3                                      \
-               | ${TAIL_25000}                                                 > syslog
-
-       #
-       # save just the "kernel" activity (in case some of the
-       # interesting/relevant message are before the messages
-       # captured above.
-       #
-       ${PRIV} /usr/bin/syslog -T local.3 -k Facility kern                     \
-               | ${TAIL_25000}                                                 > kernel
-
-       if [ -d /var/log/DiagnosticMessages ]; then
-               # save any MessageTracer activity
-               ${PRIV} /usr/bin/syslog -d /var/log/DiagnosticMessages          \
-                                       -F raw                                  \
-                                       -T local.3                              \
-                       | ${TAIL_25000}                                         > DiagnosticMessages
-       fi
-else
-       if [ -f /var/log/system.log ]; then
-               ${PRIV} ${TAIL_25000} /var/log/system.log                       > system.log
-       fi
-       if [ -f /var/log/kernel.log ]; then
-               ${PRIV} ${TAIL_25000} /var/log/kernel.log                       > kernel.log
+# collect the logarchive
+#
+if [ -x /usr/bin/log ]; then
+       LOGARCHIVE_START_TIME=`date -v -1d +"%Y-%m-%d %H:%M:%S"`
+       LOGARCHIVE_OUTPUT="system_logs.logarchive"
+       ${PRIV} /usr/bin/log collect --livedata --output "${LOGARCHIVE_OUTPUT}" --start "${LOGARCHIVE_START_TIME}"      2>/dev/null
+       if [ -d ${LOGARCHIVE_OUTPUT} ]; then
+               ${PRIV} chown -R ${UID} "${LOGARCHIVE_OUTPUT}"
        fi
 fi
-if [ -x /sbin/dmesg ]; then
-       ${PRIV} /sbin/dmesg                                                     > dmesg
-fi
 
 #
-# IPConfiguration log
+# dmesg
 #
-if [ -f /var/log/com.apple.IPConfiguration.bootp ]; then
-       ${PRIV} ${TAIL_2000} /var/log/com.apple.IPConfiguration.bootp   \
-                                                       > com.apple.IPConfiguration.bootp
+if [ -x /sbin/dmesg ]; then
+       ${PRIV} /sbin/dmesg                                                     > dmesg
 fi
 
 #
@@ -612,13 +581,6 @@ do
        fi
 done
 
-#
-# application firewall log
-#
-if [ -f /var/log/appfirewall.log ]; then
-       ${PRIV} ${TAIL_2000} /var/log/appfirewall.log   > appfirewall.log
-fi
-
 if [ -x /bin/ls ]; then
        #
        # collect crash reports
@@ -654,19 +616,6 @@ if [ -x /bin/ls ]; then
                        fi
                done
        done
-
-       #
-       # collect any verbose logging output
-       #
-       /bin/ls -1      /Library/Logs/CrashReporter/com.apple.networking.*.log*         \
-                       2>/dev/null                                                     \
-       | while read log
-       do
-               if [ -f "${log}" ]; then
-                       b="`basename ${log}`"
-                       ${PRIV} cat "${log}"                    > "${b}"                2>&1
-               fi
-       done
 fi
 
 #