admin: Support installing a kernel from the tree, default to it

The "protocol" here is rather lame; we just look for
/boot/vmlinuz-RELEASE and /lib/modules/RELEASE.  But good enough for
now.
This commit is contained in:
Colin Walters committed 2012-12-21 12:20:55 -05:00
1 parent 19df2d372d
commit 16d312e82f
4 files changed
+230 -56

No files matched your search

+27
View File
@@ -0,0 +1,27 @@
#!/bin/bash
# Post-installation hook for kernel modules. -*- mode: sh -*-
#
# Written by Colin Walters <walters@verbum.org>
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
# License as published by the Free Software Foundation; either
# version 2 of the License, or (at your option) any later version.
#
# This library is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
# Lesser General Public License for more details.
#
# You should have received a copy of the GNU Lesser General Public
# License along with this library; if not, write to the
# Free Software Foundation, Inc., 59 Temple Place - Suite 330,
# Boston, MA 02111-1307, USA.
set -e
if test -x "$(which depmod 2>/dev/null)"; then
for d in /usr/lib/modules/*; do
if test -d "$d"; then depmod $(basename "$d"); fi
done
fi