简体   繁体   English

安装rpm后加载模块

[英]Load a module after installing an rpm

I have a custom driver which I need to install during Driver Disk update as part of Linux(RHEL) installation. 我有一个自定义驱动程序,在Linux(RHEL)安装过程中需要在驱动程序磁盘更新期间安装。 Once the module is loaded, I want ahci module to be loaded automatically. 模块加载后,我希望ahci模块自动加载。
For this purpose, I have added rpm -ivh kmod-ahci-xxxx.rpm in the post install scriptlet of my custom driver rpm file. 为此,我在自定义驱动程序rpm文件的安装后脚本中添加了rpm -ivh kmod-ahci-xxxx.rpm
Followed by which I added modprobe ahci . 接下来我添加了modprobe ahci

But ahci module is still not getting loaded. 但是ahci模块仍未加载。

What should be the exact steps? 确切的步骤应该是什么?

That is not the way to install other dependencies. 那不是安装其他依赖项的方法。 You should add: 您应该添加:

 Requires: kmod-ahci

in the spec file of your "custom driver rpm". 在“自定义驱动程序rpm”的规范文件中。 If you are the one to generate the kmod-ahci rpm; 如果您是产生kmod-ahci rpm的人; I would suggest you add the modprobe ahci in the post install script of that rpm. 我建议您在该rpm的安装后脚本中添加modprobe ahci

What concerns your question why the ahci module doesn't get loaded; 什么关系到您的问题,为什么不加载ahci模块? I don't know like this. 我不知道这样 You should first try performing the steps by hand before packaging them in an rpm; 您应先尝试手动执行这些步骤,然后再以rpm进行包装; So I would try doing manually: 所以我会尝试手动执行:

rpm -ivh kmod-ahci-xxxx.rpm
modprobe ahci

and then check whether ahci is loaded or not; 然后检查是否已加载ahci; and if not search the reason why... 如果没有寻找原因...

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM