Skip to content

Commit

Permalink
if not called with a kernel argument don't fail
Browse files Browse the repository at this point in the history
  • Loading branch information
Mario Limonciello committed Jul 19, 2011
1 parent 7c068dc commit 44c2da0
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion dkms_autoinstaller
Expand Up @@ -14,7 +14,7 @@
# Short-Description: Automatically install DKMS modules for new kernels
# Description: A service to automatically install DKMS modules for new kernels.
### END INIT INFO
kernel="$2"

test -f /usr/sbin/dkms || exit 0

if [ -f /lib/lsb/init-functions ]; then
Expand All @@ -29,6 +29,12 @@ if [ ! -f /etc/debian_version ]; then
alias log_action_end_msg=log_end_msg
fi

if [ -n "$2" ]; then
kernel="$2"
else
kernel=`uname -r`
fi

# See how we were called.
case "$1" in
start)
Expand Down

0 comments on commit 44c2da0

Please sign in to comment.