modindex: getopt_long returns int not char (fix ppc64 bug)
[mit.git] / tests / test-modprobe / 21wildinstall.sh
blob18b19134f1d694917f8d4e2bd8d2b04ae3bb8d49
1 #! /bin/sh
2 # Test wildcard install/remove commands.
4 rm -rf tests/tmp/*
6 MODULE_DIR=tests/tmp/lib/modules/$MODTEST_UNAME
7 mkdir -p $MODULE_DIR
8 touch $MODULE_DIR/modules.dep
10 MODTEST_DO_SYSTEM=1
11 export MODTEST_DO_SYSTEM
13 # Create a simple config file.
14 mkdir -p tests/tmp/etc/modprobe.d
15 cat > tests/tmp/etc/modprobe.d/modprobe.conf <<EOF
16 # Various aliases
17 install *wildcard-_* echo installing \$MODPROBE_MODULE.
18 remove *wildcard-_* echo removing \$MODPROBE_MODULE.
19 EOF
21 # Install...
22 [ "`modprobe wildcard-_aaa 2>&1`" = "installing wildcard__aaa." ]
23 [ "`modprobe wildcard-_ 2>&1`" = "installing wildcard__." ]
24 [ "`modprobe wildcard_- 2>&1`" = "installing wildcard__." ]
25 [ "`modprobe anotherwildcard-_ 2>&1`" = "installing anotherwildcard__." ]
26 [ "`modprobe anotherwildcard-_aaa 2>&1`" = "installing anotherwildcard__aaa." ]
28 # Remove...
29 [ "`modprobe -r wildcard-_aaa 2>&1`" = "removing wildcard__aaa." ]
30 [ "`modprobe -r wildcard-_ 2>&1`" = "removing wildcard__." ]
31 [ "`modprobe -r wildcard_- 2>&1`" = "removing wildcard__." ]
32 [ "`modprobe -r anotherwildcard-_ 2>&1`" = "removing anotherwildcard__." ]
33 [ "`modprobe -r anotherwildcard-_aaa 2>&1`" = "removing anotherwildcard__aaa." ]