Hello,

On 02/11/23 23:18, Marcos Alano via lpi-examdev wrote:
On 02/11/2023 19:06, Alessandro Selli via lpi-examdev wrote:
>
> On 02/11/23 19:18, Éric Deschamps via lpi-examdev wrote:
>> Hello,
>>
>> Le 25/10/2023 à 10:26, Werner Heuser via lpi-examdev a écrit :
>>> Hi,
>>> here are my 2 cents:
>>> https://wiki.lpi.org/wiki/LPIC-2_Objectives_V5.0#Objectives:_Exam_201
>>> <https://wiki.lpi.org/wiki/LPIC-2_Objectives_V5.0#Objectives:_Exam_201>
>>>
>>> 201.1
>>> remove rmmod, insmod because modprobe can do better
>>> remove udevmonitor - udevadm monitor can do
>>
>> I totally agree
>
>
> I beg to differ here.
>
> Debian, package kmod    30+20221128-1:
>
> lrwxrwxrwx 1 root root 9 10 dic  2022 /sbin/modprobe -> /bin/kmod
> lrwxrwxrwx 1 root root 9 10 dic  2022 /sbin/rmmod -> /bin/kmod
> lrwxrwxrwx 1 root root 9 10 dic  2022 /sbin/modinfo -> /bin/kmod
> lrwxrwxrwx 1 root root 9 10 dic  2022 /sbin/insmod -> /bin/kmod
> lrwxrwxrwx 1 root root 4 10 dic  2022 /usr/bin/lsmod -> kmod
>
> Rocky Linux, package kmod-25-19.el8.x86_64:
>
> lrwxrwxrwx. 1 root root 11 18 apr  2022 /usr/sbin/modprobe ->
> ../bin/kmod
> lrwxrwxrwx. 1 root root 11 18 apr  2022 /usr/sbin/rmmod -> ../bin/kmod
> lrwxrwxrwx. 1 root root 11 18 apr  2022 /usr/sbin/modinfo -> ../bin/kmod
> lrwxrwxrwx. 1 root root 11 18 apr  2022 /usr/sbin/insmod -> ../bin/kmod
> lrwxrwxrwx. 1 root root 11 18 apr  2022 /usr/sbin/lsmod -> ../bin/kmod
>
> Why should just modprobe be retained?

  Modprobe command does the same as insmod (insert a module) and rmmod
  (remove a module), but it has support for dependencies tracking, so
  you would need to insert multiple modules with insmod to start a
  feature but with modprobe you just need to load a module and the
  dependencies will come together. The same with removing a module with
  "modprobe -r".



Of course I do know what are the differences between the insmod and
modprobe commands.

Please take notice that I did not write anything about insmod. I know it
was long ago superseded by modprobe, which was then, together with the
other commands (lsmod, modinfo and rmmod), replaced by kmod.

There is no reason to resurrect insmod, I remember it's own developer
put a notice on his project repository that it was no longer going to be
maintained and that it's users were warmly invited to switch to modprobe.

My point is that, since kmod does the actual work according to the name
that is used when it is executed, there is no reason to drop all the
commands except modprobe.  Of course modprobe is to be retained, but
then lsmod, modinfo and rmmod must be too.  They are all needed to let
kmod know what specific action it is to perform.


I don't think kmod is used directly for anything. I think is justa
 binary umbrella for the other commands.



Yes, indeed it is.

It only supports three parameters on it's command line: help, list (same
as lsmod) and static-nodes. To get the functionality of modinfo and
rmmod you have to run it under those names. This is the reason I object
at those commands to be removed for modprobe alone to be retained.

In my opinion LPIC-2 candidates ought to be aware of this mechanism that
underlies module management in Linux. Which means, in a nut, that they
should know of these commands:


0) kmod

1) modprobe

2) rmmod

3) modinfo

4) lsmod


Also modinfo (to show modules information) and lsmod (list the loaded
modules) aren't replaced by modprobe.

They all are symlinks to kmod. Sysadmins dealing with modules should
know this.


Alessandro



Attachment: OpenPGP_0x0B0C681E8D9C1603.asc
Description: OpenPGP public key

Attachment: OpenPGP_signature
Description: OpenPGP digital signature

_______________________________________________
lpi-examdev mailing list
[email protected]
https://list.lpi.org/mailman/listinfo/lpi-examdev

Reply via email to