summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2017-04-14 19:57:10 +0100
committerV3n3RiX <venerix@redcorelinux.org>2017-04-14 19:57:10 +0100
commitb0df4ac1c1bea98a6bd1458d51c5c69418023bee (patch)
tree08132ee17d865a6312960ad02ba3e05c0eca1450
parentbd07d65b9beb94b029823a467c93e7383c15120d (diff)
Revert "drop dkms support"
This reverts commit 3c55047bcfd0793dd295824778a58bb76f77ad01.
-rwxr-xr-xlibvasile20
-rwxr-xr-xvasile3
2 files changed, 23 insertions, 0 deletions
diff --git a/libvasile b/libvasile
index c79b1db..9bcc609 100755
--- a/libvasile
+++ b/libvasile
@@ -38,6 +38,7 @@ export local chrootsrcmode="vasile --srcmode"
export local isouser="root"
export local isomainarch="x86_64"
export local isobinmode="vasile --binmode"
+export local isodkms="vasile --dkms"
export local isokernelname="kernel-genkernel-"$isomainarch"-"$kernelver""
export local isoramfsname="initramfs-genkernel-"$isomainarch"-"$kernelver""
export local isoramfscmd="dracut -N -a dmsquash-live -a pollcdrom --force"
@@ -115,6 +116,16 @@ chrootchecksum () {
done
}
+dkmsmod () {
+ checkroot
+ # build and install any 3rd party kernel modules using DKMS
+ if [[ -x $(which dkms) ]] ; then
+ for i in $(dkms status | cut -d " " -f1,2 | sed -e 's/,//g' | sed -e 's/ /\//g' | sed -e 's/://g') ; do
+ dkms install $i
+ done
+ fi
+}
+
# build functions
chrootprepare () {
@@ -247,6 +258,11 @@ isoservices () {
done
}
+isomodules () {
+ # build and install any 3rd party kernel modules using DKMS (virtualbox-guest in our case)
+ chroot "$isorsynctarget" su - "$isouser" -c "$isodkms"
+}
+
isochroot () {
# land into a chroot env into iso image core and make adjustments, if needed
einfo "DROPPING YOU TO A ROOT SHELL INTO ISO ENVIRONMENT"
@@ -294,6 +310,10 @@ prepareiso () {
isousertree
isochroot
isostop
+ # build and install any 3rd party kernel modules using DKMS (virtualbox-guest in our case)
+ isostart
+ isomodules
+ isostop
# enable live iso image system services
isostart
isoservices
diff --git a/vasile b/vasile
index 62dc685..d64b617 100755
--- a/vasile
+++ b/vasile
@@ -34,6 +34,9 @@ case $1 in
--srcmode)
srcmode
;;
+ --dkms)
+ dkmsmod
+ ;;
--help)
showhelp
;;