Skip to content

Commit

Permalink
Use global substitution on commas in modules-load
Browse files Browse the repository at this point in the history
Without this only the first occurrence is replaced
  • Loading branch information
neeshy authored and leahneukirchen committed Jan 17, 2021
1 parent 8dec495 commit 13b21ac
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion modules-load
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ export PATH=/bin:/sbin

{
# Parameters passed as modules-load= or rd.modules-load= in kernel command line.
sed -nr 's/,/\n/;s/(.* |^)(rd\.)?modules-load=([^ ]*).*/\3/p' /proc/cmdline
sed -nr 's/,/\n/g;s/(.* |^)(rd\.)?modules-load=([^ ]*).*/\3/p' /proc/cmdline

# Find files /{etc,run,usr/lib}/modules-load.d/*.conf in that order.
find -L /etc/modules-load.d /run/modules-load.d /usr/lib/modules-load.d \
Expand Down

0 comments on commit 13b21ac

Please sign in to comment.