Advertisement
Guest User

Untitled

a guest
Feb 28th, 2016
120
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 1.97 KB | None | 0 0
  1. --- system-report.orig  2010-10-15 23:51:21.000000000 +0600
  2. +++ system-report.new   2016-02-27 23:57:24.000000000 +0500
  3. @@ -173,7 +173,9 @@
  4.     local path=
  5.     for path in /sys/module/*; do
  6.         [ "$path" != "/sys/module/*" ] || break
  7. -       module_sysinfo "$path"
  8. +# * we dont want see warnings here (change by <shadowsbrother@gmail.com>)
  9. +       module_sysinfo "$path" 2>/dev/null
  10. +# *
  11.     done >> "$r"
  12.  }
  13.  
  14. @@ -215,6 +217,9 @@
  15.     timestamp "$r"
  16.     printf "# 'dmesg' output\n\n" >> "$r"
  17.     dmesg >>"$r" 2>&1 || return
  18. +# * cut uuid from dmesg (change by <shadowsbrother@gmail.com>)
  19. +   sed -i 's/ root=UUID=\(.*[a-b0-9-]\) / root=UUID= /' hardware/sysreport.dmesg
  20. +# *
  21.  }
  22.  
  23.  # Information from syslog (kern.*)
  24. @@ -492,6 +497,11 @@
  25.     for log in /var/log/Xorg.*.log; do
  26.         [ "$log" != '/var/log/Xorg.*.log' ] || return 17
  27.         cp -a -- "$log" hardware/Xorg/ || rc=1
  28. +# * cut computer name, domain and uuid from logfile (change by <shadowsbrother@gmail.com>)
  29. +       logf=`echo $log|cut -f4 -d '/'`
  30. +       sed -i 's/ Linux \(.*[a-bA-B0-9-]\).\(.*[a-bA-B0-9-]\) / Linux /' hardware/Xorg/$logf
  31. +       sed -i 's/ root=UUID=\(.*[a-b0-9-]\) / root=UUID= /' hardware/Xorg/$logf
  32. +# *
  33.     done
  34.     return $rc
  35.  }
  36. @@ -519,6 +529,9 @@
  37.         [ ! -L "$f" ] && [ -f "$f" ] ||
  38.             continue
  39.         cp -aft system/etc/ -- "$f"
  40. +# * cut comments here (change by <shadowsbrother@gmail.com>)
  41. +       [ "$f" = "/etc/lsb_release" ] || sed -i '/^#/d' system$f
  42. +# *
  43.     done
  44.  }
  45.  
  46. @@ -591,10 +604,15 @@
  47.     exit 0
  48.  
  49.  [ -n "$outfile" ] ||
  50. -   outfile="$cwd/sysreport-$(date +"%Y%m%d").tar.bz2"
  51. +# * make .tar.xz file here (change by <shadowsbrother@gmail.com>)
  52. +   outfile="$cwd/sysreport-$(date +"%Y%m%d").tar.xz"
  53. +# *
  54.  
  55.  begin_msg "Saving system information to ${outfile##*/}"
  56. -tar -cjf "$outfile" * && rc=0 || rc=$?
  57. +# * make .tar.xz file here (change by <shadowsbrother@gmail.com>)
  58. +export XZ_OPT="-9 --extreme"
  59. +tar cfJ "$outfile" * && rc=0 || rc=$?
  60. +# *
  61.  end_msg "$rc"
  62.  
  63.  printf '\n\nPlease submit %s to sysreport@altlinux.org\n\n' "$outfile"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement