diff options
author | V3n3RiX <venerix@rogentos.ro> | 2016-10-23 13:21:14 +0100 |
---|---|---|
committer | V3n3RiX <venerix@rogentos.ro> | 2016-10-23 13:21:14 +0100 |
commit | 655ac74f6d1dca3fd56c92fe4d42c35b10b74f31 (patch) | |
tree | b05aaec4971d2d6761005e770cee0e34b6828cdd /sys-kernel/dkms/files/dkms-2.2.0.3-gentoo-functions.patch | |
parent | 1ee72da9a68ba8dc94bf31566ee45cb3dcb3b53b (diff) |
dkms : don't touch config files, use gentoo-functions, add systemd service
Diffstat (limited to 'sys-kernel/dkms/files/dkms-2.2.0.3-gentoo-functions.patch')
-rw-r--r-- | sys-kernel/dkms/files/dkms-2.2.0.3-gentoo-functions.patch | 69 |
1 files changed, 69 insertions, 0 deletions
diff --git a/sys-kernel/dkms/files/dkms-2.2.0.3-gentoo-functions.patch b/sys-kernel/dkms/files/dkms-2.2.0.3-gentoo-functions.patch new file mode 100644 index 00000000..11fd3cce --- /dev/null +++ b/sys-kernel/dkms/files/dkms-2.2.0.3-gentoo-functions.patch @@ -0,0 +1,69 @@ +diff -Nur a/dkms_autoinstaller b/dkms_autoinstaller +--- a/dkms_autoinstaller 2011-07-22 00:06:55.000000000 +0100 ++++ b/dkms_autoinstaller 2016-10-23 12:49:18.363899043 +0100 +@@ -1,52 +1,30 @@ + #!/bin/sh +-# +-# dkms_autoinstaller A service to automatically install DKMS modules +-# for new kernels. +-# chkconfig: 345 04 04 +-# description: An autoinstaller bootup service for DKMS +-# +-### BEGIN INIT INFO +-# Provides: dkms_autoinstaller dkms +-# Default-Start: 2 3 4 5 +-# Default-Stop: +-# Required-Start: $local_fs +-# Required-Stop: $null + # Short-Description: Automatically install DKMS modules for new kernels + # Description: A service to automatically install DKMS modules for new kernels. +-### END INIT INFO + + test -f /usr/sbin/dkms || exit 0 + +-if [ -f /lib/lsb/init-functions ]; then +- . /lib/lsb/init-functions +-fi +-#We only have these functions on debian/ubuntu +-# so on other distros just stub them out +-if [ ! -f /etc/debian_version ]; then +- alias log_daemon_msg=/bin/echo +- log_end_msg() { if [ "$1" = "0" ]; then echo " Done. "; else echo " Failed. "; fi } +- alias log_action_begin_msg=log_daemon_msg +- alias log_action_end_msg=log_end_msg ++if [ -f /lib/gentoo/functions.sh ]; then ++ . /lib/gentoo/functions.sh + fi + + if [ -n "$2" ]; then +- kernel="$2" ++ kernel="$2" + else +- kernel=`uname -r` ++ kernel=`uname -r` + fi + + # See how we were called. + case "$1" in +- start) +- log_daemon_msg "dkms: running auto installation service for kernel $kernel" +- dkms autoinstall --kernelver $kernel +- log_end_msg $? +- ;; +- stop|restart|force-reload|status|reload) +- # ignore +- ;; +- *) +- echo "Usage: $0 {start}" ++ start) ++ einfo "dkms: running auto installation service for kernel $kernel" ++ dkms autoinstall --kernelver $kernel ++ ;; ++ status) ++ dkms status ++ ;; ++ *) ++ echo "Usage: $0 {start}" + esac + + exit 0 |