blob: 5b4d5a030e35a7de2a834aa914179ae4df0ba911 (
plain)
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
|
#!/bin/bash
if ((${#1} == 0)) ; then
echo 'usage: imageinfo.sh userid@system'
exit 1
fi
ssh $1 '[[ -d /opt/rs9113 ]] && cp -a /opt/rs9113/*.ko /lib/modules/$(uname -r)/extra || depmod -a'
echo fetching ipklists
d=$(mktemp -d mVerXXXXX)
ssh $1 opkg list | sort >$d/ipklist.txt
ssh $1 uname -a >$d/drivers.txt
drivers=$(ssh $1 lsmod | sed 's/ .*//' | sort)
for driver in $drivers ; do
if [[ "$driver" == "Module" ]] ; then
continue
fi
{
echo
echo "$driver"
echo "--------------"
ssh $1 modinfo $driver | grep -v '^alias:'
} >>$d/drivers.txt
done
scp $1:/etc/mlinux-\* $d
cd $d
echo "--------------" >>drivers.txt
extrad=(
"bootstrap 3.5.3-r3"
"u-boot-mtcap 2012.10-r6"
"uImage 3.12.27-r14.2"
)
((i=0))
while ((i < ${#extrad[@]})) ; do
printf "%-15s %-s\n" ${extrad[$i]} >>drivers.txt
((i++))
done
zip image_versions.zip *.txt mlinux*
echo Zip file is $(pwd)/image_versions.zip
|