diff options
Diffstat (limited to 'rog/usr')
-rwxr-xr-x | rog/usr/lib/udev/VBoxCreateUSBNode.sh | 51 | ||||
-rwxr-xr-x | rog/usr/local/bin/local-cleanup.sh | 2 | ||||
-rwxr-xr-x | rog/usr/local/bin/local.sh | 8 | ||||
-rwxr-xr-x | rog/usr/local/bin/sign-modules.sh | 15 |
4 files changed, 73 insertions, 3 deletions
diff --git a/rog/usr/lib/udev/VBoxCreateUSBNode.sh b/rog/usr/lib/udev/VBoxCreateUSBNode.sh new file mode 100755 index 0000000..ae45de2 --- /dev/null +++ b/rog/usr/lib/udev/VBoxCreateUSBNode.sh @@ -0,0 +1,51 @@ +#! /bin/sh +# $Id: VBoxCreateUSBNode.sh $ */ +## @file +# VirtualBox USB Proxy Service, Linux Specialization. +# udev helper for creating and removing device nodes for VirtualBox USB devices +# + +# +# Copyright (C) 2010-2020 Oracle Corporation +# +# This file is part of VirtualBox Open Source Edition (OSE), as +# available from http://www.virtualbox.org. This file is free software; +# you can redistribute it and/or modify it under the terms of the GNU +# General Public License (GPL) as published by the Free Software +# Foundation, in version 2 as it comes in the "COPYING" file of the +# VirtualBox OSE distribution. VirtualBox OSE is distributed in the +# hope that it will be useful, but WITHOUT ANY WARRANTY of any kind. +# + +# Constant, from the USB specifications +usb_class_hub=09 + +do_remove=0 +case "$1" in "--remove") + do_remove=1; shift;; +esac +bus=`expr "$2" '/' 128 + 1` +device=`expr "$2" '%' 128 + 1` +class="$3" +group="$4" +devdir="`printf "/dev/vboxusb/%.3d" $bus`" +devpath="`printf "/dev/vboxusb/%.3d/%.3d" $bus $device`" +case "$do_remove" in + 0) + if test -n "$class" -a "$class" -eq "$usb_class_hub" + then + exit 0 + fi + case "$group" in "") group="vboxusers";; esac + mkdir /dev/vboxusb -m 0750 2>/dev/null + chown root:$group /dev/vboxusb 2>/dev/null + mkdir "$devdir" -m 0750 2>/dev/null + chown root:$group "$devdir" 2>/dev/null + mknod "$devpath" c $1 $2 -m 0660 2>/dev/null + chown root:$group "$devpath" 2>/dev/null + ;; + 1) + rm -f "$devpath" + ;; +esac + diff --git a/rog/usr/local/bin/local-cleanup.sh b/rog/usr/local/bin/local-cleanup.sh index 9495ec1..ff79960 100755 --- a/rog/usr/local/bin/local-cleanup.sh +++ b/rog/usr/local/bin/local-cleanup.sh @@ -1,4 +1,4 @@ #!/bin/bash umount /mnt/d/ -umount /mnt/dislocker2 +#umount /mnt/dislocker2 diff --git a/rog/usr/local/bin/local.sh b/rog/usr/local/bin/local.sh index c89c8b2..96bf893 100755 --- a/rog/usr/local/bin/local.sh +++ b/rog/usr/local/bin/local.sh @@ -10,7 +10,11 @@ #mount -t ntfs-3g -o defaults,rw,uid=1000,gid=1000,nofail,x-systemd.device-timeout=5 /dev/disk/by-id/md-uuid-415ed6dd:4dba377d:7cb2adcb:e170454c-part1 /mnt/d # the 14TB hdd -dislocker-fuse -v -r -V "/dev/disk/by-id/ata-ST14000DM001-2JC101_ZHZ1GDKT-part2" -pXXXXXX-XXXXXX-XXXXXX-XXXXXX-XXXXXX-XXXXXX-XXXXXX-XXXXXX -- /mnt/dislocker/ -mount -o loop,ro,defaults,exec,uid=1000,gid=1000 /mnt/dislocker/dislocker-file /mnt/e/ +dislocker-fuse -v -r -V "/dev/disk/by-id/ata-ST14000DM001-2JC101_ZHZ1GDKT-part2" -p597707-275451-080267-169389-714274-455103-194942-207790 -- /mnt/dislocker/ +mount -o loop,ro,defaults,nofail,exec,uid=1000,gid=1000 /mnt/dislocker/dislocker-file /mnt/e/ /usr/local/bin/sign-modules.sh + +hdparm -S 0 /dev/disk/by-id/ata-ST14000DM001-2JC101_ZHZ1GDKT + +exit 0 diff --git a/rog/usr/local/bin/sign-modules.sh b/rog/usr/local/bin/sign-modules.sh new file mode 100755 index 0000000..c0af5de --- /dev/null +++ b/rog/usr/local/bin/sign-modules.sh @@ -0,0 +1,15 @@ +#!/bin/bash + +cd ~ + +/usr/src/linux-headers-$(uname -r)/scripts/sign-file sha256 ./MOK.priv ./MOK.der $(modinfo -n nvidia) +/usr/src/linux-headers-$(uname -r)/scripts/sign-file sha256 ./MOK.priv ./MOK.der $(modinfo -n nvidia_drm) +/usr/src/linux-headers-$(uname -r)/scripts/sign-file sha256 ./MOK.priv ./MOK.der $(modinfo -n nvidia_uvm) +/usr/src/linux-headers-$(uname -r)/scripts/sign-file sha256 ./MOK.priv ./MOK.der $(modinfo -n nvidia_modeset) + +/usr/src/linux-headers-$(uname -r)/scripts/sign-file sha256 ./MOK.priv ./MOK.der $(modinfo -n vboxdrv) +/usr/src/linux-headers-$(uname -r)/scripts/sign-file sha256 ./MOK.priv ./MOK.der $(modinfo -n vboxnetadp) +/usr/src/linux-headers-$(uname -r)/scripts/sign-file sha256 ./MOK.priv ./MOK.der $(modinfo -n vboxnetflt) +#/usr/src/linux-headers-$(uname -r)/scripts/sign-file sha256 ./MOK.priv ./MOK.der $(modinfo -n vboxpci) + +exit 0 |