Rex::C...:Kernel(3pm)

✨ NAME ✨

Rex::Commands::Kernel β€” Load/Unload Kernel Modules 🧚 (yeah bestie, that's the NAME line; the running header up top just calls it Rex::C...:Kernel(3pm) because terminal headers are dramatic and truncate everything πŸ’…)


🌸 DESCRIPTION 🌸

Okay so listen. With this module you can load and unload kernel modules. That's it, that's the whole vibe β€” it's giving "kernel module on, kernel module off" and honestly? Iconic.

Version <= 1.0: all these functions will not be reported. Not a drill, not a bug, just how it is πŸ™ˆ

⚠️ Real talk: all these functions are not idempotent. So do not just run them over and over assuming it's chill and harmless like your fave idempotent tasks. It is not. Respect the vibe check βœ‹

πŸŽ€ SYNOPSIS πŸŽ€

The whole thing in two lines, lowkey gorgeous:

kmod load => "ipmi_si";

kmod unload => "ipmi_si";

πŸ¦‹ EXPORTED FUNCTIONS πŸ¦‹

kmod($action => $module)

This function loads or unloads a kernel module. Passing load gets you a module loaded, passing unload sends it home, exactly like the examples show 🫢

task "load", sub {
  kmod load => "ipmi_si";
};

task "unload", sub {
  kmod unload => "ipmi_si";
};

Now β€” if you're using NetBSD or OpenBSD, the rules shift, no cap. You have to specify the complete path, and, if needed, the entry function. Periodt.

task "load", sub {
  kmod load => "/usr/lkm/ntfs.o";
  kmod load => "/path/to/module.o", entry => "entry_function";
};

So like, <cyan>/usr/lkm/ntfs.o</cyan> vibes β€” full path, every time, and tack on entry => "entry_function" when the module needs its entry point named. Slay 🌈


That's the whole page, bestie. Written for perl v5.40.1, dated 2025-10-03, straight out of the User Contributed Perl Documentation corner of the universe. Go load a kernel module responsibly πŸ’–βœ¨πŸŽ€

πŸ“¦ where this page comes from