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
|
#!/bin/sh
archmodel() {
local arch=$(dpkg-architecture -qDEB_HOST_ARCH)
case $arch in
i[0-9]86) arch=i386 ;;
x86_64|amd64) arch=x86_64 ;;
lpia) arch=i386 ;;
arm*) arch=arm ;;
mips*) arch=mips ;;
s390x) arch=s390 ;;
parisc64) arch=parisc ;;
sparc64) arch=sparc ;;
ppc64) arch=powerpc.generic ;;
ppc|powerpc) 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
|