Dkms_autoinstaller on SLES9 and SLES10 fails
Matt Domsch
Matt_Domsch at dell.com
Tue Sep 4 08:21:19 CDT 2007
On Tue, Sep 04, 2007 at 06:25:59PM +0530, Charles_Rose at dell.com wrote:
> Hello,
>
> I tried installing dkms-2.0.17-1 on SLES9 and SLES10. The install succeeds but with this message:
>
> dkms_autoinstaller: unknown service
>
> The same is seen when I uninstall dkms. chkconfig is causing the message:
>
> /sbin/chkconfig dkms_autoinstaller on
>
> This might be a problem with $RPM_BUILD_ROOT%{_initrddir} in the
> dkms.spec file instead of the older (2.0.13)
> $RPM_BUILD_ROOT/etc/init.d/dkms_autoinstaller. _initrddir points to
> /etc/rc.d/init.d.
>
> On RHEL, this works as intended - /etc/rc.d/init.d/ is where dkms_autoinstaller is copied to.
>
> On SLES, /etc/rc.d -> init.d (rc.d is a softlink) so rpm creates a
> new dir - /etc/init.d/init.d and dkms_autoinstaller is copied to
> /etc/init.d/init.d
Good catch. This is a figment of the new makefile work. 'make
redhat-install' gets run in the dkms.spec file, at rpmbuild time, where
it has picked up Red Hat's definition of _initrddir which of course
doesn't work on SuSE.
I'll apply this in the dkms.spec, so it uses /etc/init.d as the
directory name always. That works on SuSE and Red Hat both, even if
/etc/rc.d/init.d is a symlink (the mkdir -p in Makefile will fail to
create the dir, but won't fail, so that's ok).
diff --git a/dkms.spec b/dkms.spec
index 7f28743..72d7bd3 100644
--- a/dkms.spec
+++ b/dkms.spec
@@ -78,7 +78,6 @@ make install-redhat DESTDIR=$RPM_BUILD_ROOT \
SBIN=$RPM_BUILD_ROOT%{_sbindir} \
VAR=$RPM_BUILD_ROOT%{_localstatedir}/lib/%{name} \
MAN=$RPM_BUILD_ROOT%{_mandir}/man8 \
- INITD=$RPM_BUILD_ROOT%{_initrddir} \
ETC=$RPM_BUILD_ROOT%{_sysconfdir}/%{name} \
BASHDIR=$RPM_BUILD_ROOT%{_sysconfdir}/bash_completion.d
I see another little problem though. make install-redhat installs
/sbin/dkms_mkkerneldoth, which is only needed on RHEL <= 3, and makes
no sense otherwise. Right now we're unconditionally installing this,
but it would be cleaner to not install it if it's not needed, and to
add a test in DKMS for existance before calling it. Going down that
route, I'd wind up with separate packages for RHEL <= 3 than for
everything else, which is not ideal either. So I guess it stays as-is
for now.
Thanks,
Matt
--
Matt Domsch
Linux Technology Strategist, Dell Office of the CTO
linux.dell.com & www.dell.com/linux
More information about the DKMS-devel
mailing list