File: installarchconf

package info (click to toggle)
module-init-tools 3.2-pre1-2
  • links: PTS
  • area: main
  • in suites: sarge
  • size: 384 kB
  • ctags: 27
  • sloc: sh: 566; makefile: 217
file content (46 lines) | stat: -rw-r--r-- 908 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
#!/bin/sh

archmodel() {
    local arch=$(uname -m)
    case $arch in
	i[0-9]86)	arch=i386 ;;
	x86_64)		arch=i386 ;;
	arm*)		arch=arm ;;
	mips*)		arch=mips ;;
	s390x)		arch=s390 ;;
	parisc64)	arch=parisc ;;
	sparc64)	arch=sparc ;;
	ppc)		arch="powerpc.*" ;;
	m68k)		arch="m68k.*" ;;
    esac
    echo $arch
}

if [ -z "$1" ]; then
    echo "Usage: $0 DESTINATION_DIRECTORY"
    exit 1
fi

arch=$(archmodel)

for file in extra/modprobe.d/arch/$arch; do
    if [ ! -f $file -a "$(echo $file)" = "$file" ]; then
	cat <<EOM



=================================================================
There are no architecture-specific modprobe files to install
for your architecture ($arch). This is probably an error.
If so, please send an appropriate configuration to the maintainer
of this package.
=================================================================


EOM
	sleep 10
    else
	cp $file $1
    fi
done