diff options
author | André Fabian Silva Delgado <emulatorman@parabola.nu> | 2014-01-31 14:13:04 -0200 |
---|---|---|
committer | André Fabian Silva Delgado <emulatorman@parabola.nu> | 2014-01-31 14:13:04 -0200 |
commit | 7395b28b4a9ebcc527f0e1b6ab37335ebdde109f (patch) | |
tree | b443666fa51b925c046563f18a9abda164c2b947 /libre/dkms-libre/dkms.systemd | |
parent | c7555a26857f08cecb2fb7c2a695c7aaf964dbbb (diff) | |
download | abslibre-7395b28b4a9ebcc527f0e1b6ab37335ebdde109f.tar.gz abslibre-7395b28b4a9ebcc527f0e1b6ab37335ebdde109f.tar.bz2 abslibre-7395b28b4a9ebcc527f0e1b6ab37335ebdde109f.zip |
remove dkms-libre because is only useful with nonfree open-vm-tools-dkms, virtualbox-guest-dkms and virtualbox-host-dkms
Diffstat (limited to 'libre/dkms-libre/dkms.systemd')
-rw-r--r-- | libre/dkms-libre/dkms.systemd | 61 |
1 files changed, 0 insertions, 61 deletions
diff --git a/libre/dkms-libre/dkms.systemd b/libre/dkms-libre/dkms.systemd deleted file mode 100644 index 03e6bfe97..000000000 --- a/libre/dkms-libre/dkms.systemd +++ /dev/null @@ -1,61 +0,0 @@ -#!/bin/bash - -. /etc/default/dkms - -# list dkms modules for the current running kernel -list_dkms_modules() { - shopt -s nullglob - declare -a DKMS_MOULES - # dkms status needs uname -r to list correctly intalled version for current kernel - local modules_path=($(dkms status -k "$(uname -r)"|sed -rn 's#(.*), (.*), (.*), (.*): installed#\1/\2/\3/\4#p')) - for p in "${modules_path[@]}"; do - for m in /var/lib/dkms/"$p"/module/*.ko{,gz}; do - m=${m##*/} - m=${m%.gz} - m=${m%.ko} - DKMS_MODULES+=("$m") - done - done -} - -# load installed kernel modules for the current kernel version -load_dkms_modules() { - local ret=0 - list_dkms_modules - for m in "${DKMS_MODULES[@]}"; do - modprobe "$m" - ret+=$? - done - return $ret -} - -# unload installed kernel modules for the current kernel version -unload_dkms_modules() { - list_dkms_modules - # ask for removal - for m in "${DKMS_MODULES[@]}"; do - modprobe --remove --quiet "$m" - done - # check modules are unloaded - # sometimes modprobe -r fail but modules are removed - for m in "${DKMS_MODULES[@]}"; do - [[ -e /sys/modules/$m ]] && return 1 - done - return 0 -} - -case "$1" in - start) - dkms autoinstall -k "$(uname -r)" - [[ $LOAD =~ [Yy][Ee][Ss] ]] && load_dkms_modules - ;; - stop) - [[ $UNLOAD =~ [Yy][Ee][Ss] ]] && unload_dkms_modules - ;; - *) - echo "usage: $0 {start|stop}" >&2 - ;; -esac - -: -# vim:set ts=2 sw=2 ft=sh et: |