2 # Test wildcard install/remove commands.
6 MODULE_DIR
=tests
/tmp
/lib
/modules
/$MODTEST_UNAME
8 touch $MODULE_DIR/modules.dep
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
17 install *wildcard-_* echo installing \$MODPROBE_MODULE.
18 remove *wildcard-_* echo removing \$MODPROBE_MODULE.
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." ]
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." ]