Magellan Linux

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

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 2653 by niro, Tue Nov 10 15:03:34 2015 UTC revision 2654 by niro, Tue Nov 10 15:11:08 2015 UTC
# Line 27  set_kernel_module() Line 27  set_kernel_module()
27    
28   case "${action}" in   case "${action}" in
29   add)   add)
30   CONFIG="${MROOT}/etc/modules-load.d/mcore-${module}.conf"   mcore-kernel-module --method "${action}" --module "${module}" --opts "${opts}"
  clearconfig  
  addconfig "# mcore autogenerated file - do not edit"  
  addconfig "${module}"  
   
  if [[ -n ${opts} ]]  
  then  
  CONFIG="${MROOT}/etc/modprobe.d/mcore-${module}.conf"  
  clearconfig  
  addconfig "# mcore autogenerated file - do not edit"  
  addconfig "${module}.${opts}"  
  fi  
   
  # restart systemd modules-load service  
  # systemd  
  if is_provided systemd  
  then  
  mcore-system-service --restart --service systemd-modules-load.service  
  fi  
  # sysvinit  
  if is_provided sysvinit  
  then  
  mcore-system-service --restart --service modules  
  fi  
31   ;;   ;;
32    
33   del)   del)
34   if [[ -f ${MROOT}/etc/modules-load.d/mcore-${module}.conf ]]   mcore-kernel-module --method "${action}" --module "${module}"
  then  
  rm ${MROOT}/etc/modules-load.d/mcore-${module}.conf  
  fi  
  if [[ -f ${MROOT}/etc/modprobe.d/mcore-${module}.conf ]]  
  then  
  rm ${MROOT}/etc/modprobe.d/mcore-${module}.conf  
  fi  
   
  # try to remove the kernel module  
  modprobe -r "${module}"  
   
  # restart systemd modules-load service  
  # systemd  
  if is_provided systemd  
  then  
  mcore-system-service --restart --service systemd-modules-load.service  
  fi  
  # sysvinit  
  if is_provided sysvinit  
  then  
  mcore-system-service --restart --service modules  
  fi  
35   ;;   ;;
36    
37   *) help_kernel_module && return 1 ;;   *) help_kernel_module && return 1 ;;

Legend:
Removed from v.2653  
changed lines
  Added in v.2654