|
|
c1a53c5 |
#!/bin/bash
|
|
|
c1a53c5 |
#
|
|
|
c1a53c5 |
# akmods-shutdown - Helper script to build kernel modules on shutdown
|
|
|
c1a53c5 |
# Copyright (c) 2012 Richard shaw <hobbes1069@gmail.com>
|
|
|
c1a53c5 |
#
|
|
|
c1a53c5 |
# Permission is hereby granted, free of charge, to any person obtaining
|
|
|
c1a53c5 |
# a copy of this software and associated documentation files (the
|
|
|
c1a53c5 |
# "Software"), to deal in the Software without restriction, including
|
|
|
c1a53c5 |
# without limitation the rights to use, copy, modify, merge, publish,
|
|
|
c1a53c5 |
# distribute, sublicense, and/or sell copies of the Software, and to
|
|
|
c1a53c5 |
# permit persons to whom the Software is furnished to do so, subject to
|
|
|
c1a53c5 |
# the following conditions:
|
|
|
c1a53c5 |
#
|
|
|
c1a53c5 |
# The above copyright notice and this permission notice shall be
|
|
|
c1a53c5 |
# included in all copies or substantial portions of the Software.
|
|
|
c1a53c5 |
#
|
|
|
c1a53c5 |
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
|
|
c1a53c5 |
# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
|
|
c1a53c5 |
# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
|
|
c1a53c5 |
# NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
|
|
c1a53c5 |
# LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
|
|
c1a53c5 |
# OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
|
|
c1a53c5 |
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|
|
c1a53c5 |
#
|
|
|
c1a53c5 |
|
|
|
c1a53c5 |
echo "Building modules for all installed kernels."
|
|
|
c1a53c5 |
for kernel in /usr/src/kernels/*; do
|
|
|
c1a53c5 |
kernel=$(basename $kernel)
|
|
|
14ed5fe |
/usr/sbin/akmods --kernels $kernel
|
|
|
c1a53c5 |
done
|
|
|
c1a53c5 |
|