If "output" field in "lkm.conf" is set to "TEMP" create output file in

"/tmp" and remove it after loading.
This commit is contained in:
tron 1998-12-29 16:29:23 +00:00
parent 21e272bf01
commit 7b08b77240
1 changed files with 9 additions and 4 deletions

View File

@ -1,4 +1,4 @@
# $NetBSD: rc.lkm,v 1.3 1997/07/18 23:38:52 perry Exp $
# $NetBSD: rc.lkm,v 1.4 1998/12/29 16:29:23 tron Exp $
#
# this script loads any LKM's that are required.
@ -18,7 +18,7 @@
elif [ -f "/usr/lkm/$path" ]; then
path="/usr/lkm/$path"
else
echo "couldn't find module $path";
echo "couldn't find module $path"
fi
;;
esac
@ -51,7 +51,11 @@
-)
;;
*)
cmd="$cmd -o $output"
if [ "$output" = TEMP ]; then
cmd="$cmd -o /tmp/lkm.$$"
else
cmd="$cmd -o $output"
fi
;;
esac
@ -60,7 +64,7 @@
when=BEFORENET
;;
[A-Z]*)
;;
;;
*)
echo "invalid \"when\" field in /etc/lkm.conf - $path not loaded!"
continue
@ -73,6 +77,7 @@
echo -n "`basename $path .o`: "
$cmd $path
rm -f /tmp/lkm.$$
done
) < /etc/lkm.conf