mirror of
https://gitdl.cn/https://github.com/chakralinux/desktop.git
synced 2025-01-23 18:14:51 +08:00
4620c36c1e
Introduced condition on virtualbox-guest-dkms.conf file to prevent building module for kernel >= 4.16 since are included in the kernel itself fix #83 [testing]
18 lines
500 B
Bash
18 lines
500 B
Bash
#!/bin/bash
|
|
|
|
# Hopefully this works as intented, supporting both pre-4.16 and newer kernels
|
|
# https://bugs.archlinux.org/task/58272#comment168687
|
|
|
|
kver_major=$(uname -r | cut -d. -f1)
|
|
kver_minor=$(uname -r | cut -d. -f2)
|
|
|
|
if ((kver_major * 100 + kver_minor < 416)); then
|
|
exec /usr/lib/virtualbox/mount.vboxsf "$@"
|
|
fi
|
|
|
|
# mount(1) annoyingly prepends the current directory to the source
|
|
name=${1#$PWD/}; shift
|
|
|
|
# Mainline vboxsf accepts regular mount opts
|
|
exec /usr/bin/mount -cit vboxsf "$name" "$@"
|