Magellan Linux

Annotation of /mcore-src/trunk/mcore-tools/src/modules/basic-kernel/kernel.client.class.in

Parent Directory Parent Directory | Revision Log Revision Log


Revision 2654 - (hide annotations) (download)
Tue Nov 10 15:11:08 2015 UTC (8 years, 6 months ago) by niro
File size: 716 byte(s)
-use helper script to add modules
1 niro 2649 # $Id$
2    
3     provide basic-kernel
4     require basic-init
5    
6     help_kernel_module()
7     {
8     mecho "get kernel.module"
9     mecho " prints current list of kernel modules"
10     mecho
11     mecho "set kernel.module [action] [module] [opts]"
12     }
13    
14     get_kernel_module()
15     {
16     return 0
17     }
18    
19     set_kernel_module()
20     {
21     local action="${CLASS_ARGV[0]}"
22     local module="${CLASS_ARGV[1]}"
23     local opts="${CLASS_ARGV[2]}"
24    
25     [[ -z ${action} ]] && help_kernel_module && return 1
26     [[ -z ${module} ]] && help_kernel_module && return 1
27    
28     case "${action}" in
29     add)
30 niro 2654 mcore-kernel-module --method "${action}" --module "${module}" --opts "${opts}"
31 niro 2649 ;;
32    
33     del)
34 niro 2654 mcore-kernel-module --method "${action}" --module "${module}"
35 niro 2649 ;;
36    
37     *) help_kernel_module && return 1 ;;
38     esac
39     }