1 | #!/bin/sh
|
---|
2 |
|
---|
3 | #
|
---|
4 | # This script is used when building kernel modules from DKMS. I don't
|
---|
5 | # know how to solve the problem of inter-module dependencies better.
|
---|
6 | #
|
---|
7 | # Copyright (C) 2008 Oracle Corporation
|
---|
8 | #
|
---|
9 | # Oracle Corporation confidential
|
---|
10 | # All rights reserved
|
---|
11 | #
|
---|
12 |
|
---|
13 | SYMFILE="/tmp/$1-Module.symvers"
|
---|
14 | case "$2" in
|
---|
15 | save)
|
---|
16 | if [ -f "$3" ]; then
|
---|
17 | cp "$3" "$SYMFILE"
|
---|
18 | fi
|
---|
19 | ;;
|
---|
20 | restore)
|
---|
21 | if [ -f "$SYMFILE" ]; then
|
---|
22 | cp "$SYMFILE" "$3"
|
---|
23 | fi
|
---|
24 | ;;
|
---|
25 | *)
|
---|
26 | echo "Usage: <modname> save|restore <location of Module.symvers>"
|
---|
27 | ;;
|
---|
28 | esac
|
---|