File: system

package info (click to toggle)
sitesummary 0.0.47
  • links: PTS
  • area: main
  • in suites: lenny
  • size: 264 kB
  • ctags: 71
  • sloc: perl: 931; sh: 386; makefile: 63
file content (57 lines) | stat: -rwxr-xr-x 1,202 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
#!/bin/sh

PATH=/sbin:/usr/sbin:/bin:/usr/bin:/usr/local/sbin:/usr/local/bin

# Keep going even if one of the programs report an error code
# set -e

mkdir system && cd system

if type dmidecode >/dev/null 2>&1; then
    # Throw away error messages.  It will print "/dev/mem: mmap: Bad address"
    # in Xen machines.
    dmidecode   > dmidecode 2> /dev/null
fi

if type lspci >/dev/null 2>&1; then
    lspci       > lspci
    lspci -n    > lspci-n
fi

if type lsusb >/dev/null 2>&1; then
    lsusb       > lsusb
fi

if type lsscsi >/dev/null 2>&1; then
    lsscsi       > lsscsi
fi

if type lsmod >/dev/null 2>&1; then
    lsmod       > lsmod
fi

uname -smr  > uname-smr
uname -n    > hostname
ifconfig -a > ifconfig-a
route -n    > route-n
cat /proc/cpuinfo > cpuinfo

# Collect mount points, for nagios configuration
cp /etc/fstab fstab
cat /proc/mounts > procmounts

# Document current runlevel, useful to differenciate LTSP
# thin clients from diskless workstations.
runlevel > runlevel

if [ -x /usr/sbin/laptop-detect ] && /usr/sbin/laptop-detect; then
    touch laptop
fi

for f in /etc/ssh/ssh_host*.pub ; do
    cp $f .
done

if [ -f /etc/X11/xorg.conf ]; then
    cp /etc/X11/xorg.conf .
fi