#!/bin/sh for i in /lib/modules/*; do [ -f $i/current ] || continue depmod ${i##*/} mkinitrd -k ${i##*/} /boot/initrd-linux done