[Bug 450411] modprobe.conf enhancements needed to replace most of 'install' commands
https://bugzilla.novell.com/show_bug.cgi?id=450411 User nfbrown@novell.com added comment https://bugzilla.novell.com/show_bug.cgi?id=450411#c8 --- Comment #8 from Neil Brown <nfbrown@novell.com> 2008-12-02 17:38:11 MST --- Thanks for looking at the patch. The purpose of the --force-install option was to remove the concerns that you mention. --show-depends and --dry-run only rely on the install commands being written carefully if --force-install is used. So a distro that wants to use modprobe --show-depends --force-install module to get a full list of dependencies needs to make sure the install commands are written carefully. People who don't want to use the new functionality don't need to care. I have a new patch which I will attach. It fixes a bug (--dry-run wasn't being passed down to child modprobes), adds documentation, and changes the $TRUE_INSMOD part of change. Instead of $TRUE_INSMOD being replaced by either 'true' or 'false' we now have $PROTECT replaced by with empty-string or ':'. As ':' is a no-op command to the shell, something like /sbin/modprobe --ignore-install foo && $PROTECT /sbin/somecommand will become /sbin/modprobe --ignore-install foo && /sbin/somecommand in normal usage, and /sbin/modprobe --ignore-install foo && : /sbin/somecommand for a dry-run or show-depends. The : /sbin/somecommand will do nothing which is what we want in this case. If you want something more sophisticated you can still use and 'if' e.g. if [ -n "$PROTECT" ] ; then one-thing ; else another ; fi I think this is simpler, and has the advantage that if you use $PROTECT in an install command read by an old modprobe, it will quietly be ignored (as unknown variables are simply replaced by an empty string by the shell). Thoughts? -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
participants (1)
-
bugzilla_noreply@novell.com