Package: dkms
Version: 2.3-2
Severity: important
Tags: patch upstream

Dear Maintainer,

When the system '/bin/sh' points to zsh shell, dkms_autoinstaller is run
with zsh in sh compatibility mode; this requires functions end
    Fix syntactic error when the system shell is zsh
    
    When the system '/bin/sh' points to the zsh shell,
    then the script is run with zsh in sh compatibility mode; in that case
    functions must end with either a semicolon or a newline.
    (https://github.com/dell/dkms/issues/62)
    * dkms_autoinstaller (log_end_msg):
    Terminate the function with a semicolon.
    Add missing white space in comment.

with either a semicolon or a newline.
In that case, this script fails with a parse error in function log_end_msg.

Bug reported upstream here:
--8<-----------------------------cut here---------------start------------->8---
commit 9b44ee67e4a7fc4a215561c8a788a7ea66544ffb
diff --git a/dkms_autoinstaller b/dkms_autoinstaller
index 0e7f070..7fbe8f3 100755
--- a/dkms_autoinstaller
+++ b/dkms_autoinstaller
@@ -22,11 +22,11 @@ elif [ -f /etc/rc.d/init.d/functions ]; then
     . /etc/rc.d/init.d/functions
 fi
 
-#We only have these functions on debian/ubuntu
+# 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 }
+    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
 fi

--8<-----------------------------cut here---------------end--------------->8---


-- System Information:
Debian Release: 9.5
  APT prefers stable
  APT policy: (500, 'stable')
Architecture: amd64 (x86_64)
Foreign Architectures: i386

Kernel: Linux 4.9.0-7-amd64 (SMP w/4 CPU cores)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8), 
LANGUAGE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/zsh
Init: systemd (via /run/systemd/system)

Versions of packages dkms depends on:
ii  build-essential  12.3
ii  coreutils        8.26-3
ii  dpkg-dev         1.18.25
ii  gcc              4:6.3.0-4
ii  kmod             23-2
ii  make             4.1-9.1
ii  patch            2.7.5-1+deb9u1

Versions of packages dkms recommends:
ii  fakeroot             1.21-3.1
ii  linux-headers-amd64  4.9+80+deb9u6
ii  lsb-release          9.20161125
ii  sudo                 1.8.19p1-2.1

Versions of packages dkms suggests:
pn  menu            <none>
pn  python3-apport  <none>

-- no debconf information

Reply via email to