#!/bin/sh # we need to have our modprobe.d files with .conf suffix for i in /etc/modprobe.d/*; do # ignore files that does not exist (i.e if modprobe.d is empty) [ -r "$i" ] || continue # ignore files that has an extention case "$i" in *.*) continue;; esac # append extension mv "$i" "$i".conf done