summaryrefslogtreecommitdiff
path: root/app-misc/rogentoslive-tools/files/2/x-setup-configuration
diff options
context:
space:
mode:
authorBlackNoxis <steven.darklight@gmail.com>2014-02-15 23:24:26 +0200
committerBlackNoxis <steven.darklight@gmail.com>2014-02-15 23:24:26 +0200
commit7224c1253228e5c29c78cb3f0f26ce34770f2356 (patch)
tree1684924656132935256e034f35f92abee6623265 /app-misc/rogentoslive-tools/files/2/x-setup-configuration
Added ebuilds for kogaion desktop
Diffstat (limited to 'app-misc/rogentoslive-tools/files/2/x-setup-configuration')
-rw-r--r--app-misc/rogentoslive-tools/files/2/x-setup-configuration46
1 files changed, 46 insertions, 0 deletions
diff --git a/app-misc/rogentoslive-tools/files/2/x-setup-configuration b/app-misc/rogentoslive-tools/files/2/x-setup-configuration
new file mode 100644
index 00000000..b8747097
--- /dev/null
+++ b/app-misc/rogentoslive-tools/files/2/x-setup-configuration
@@ -0,0 +1,46 @@
+#!/bin/bash
+
+# get livecd functions
+source /sbin/livecd-functions.sh
+source /sbin/rogentos-functions.sh
+
+runtime_linking_proprietary_drivers() {
+ if [ -d "/lib/nvidia" ] || [ -d "/lib/fglrx" ]; then
+ current_arch=$(uname -m)
+ if [ "$current_arch" == "x86_64" ]; then
+ ld_arch="elf_x86_64"
+ elif [ "$current_arch" == "i686" ]; then
+ ld_arch="elf_i386"
+ fi
+ lspci_vga=$(lspci | grep ' VGA ')
+ mount -t tmpfs none /lib/modules/$(uname -r)/video
+ if [ -n "`echo $lspci_vga | grep -i nvidia`" ]; then
+ ld -m $ld_arch -r -o /lib/modules/$(uname -r)/video/nvidia.ko /lib/nvidia/nvidia.o /lib/nvidia/nvidia.mod.o
+ depmod -a &> /dev/null
+ elif [ -n "`echo $lspci_vga | grep -i ati`" ]; then
+ ld -m $ld_arch -r -o /lib/modules/$(uname -r)/video/fglrx.ko /lib/fglrx/fglrx.o /lib/fglrx/fglrx.mod.o
+ depmod -a &> /dev/null
+ elif [ -n "`echo $lspci_vga | grep -i unknown`" ]; then
+ ld -m $ld_arch -r -o /lib/modules/$(uname -r)/video/nvidia.ko /lib/nvidia/nvidia.o /lib/nvidia/nvidia.mod.o
+ ld -m $ld_arch -r -o /lib/modules/$(uname -r)/video/fglrx.ko /lib/fglrx/fglrx.o /lib/fglrx/fglrx.mod.o
+ depmod -a &> /dev/null
+ elif [ -z "$lspci_vga" ]; then
+ ld -m $ld_arch -r -o /lib/modules/$(uname -r)/video/nvidia.ko /lib/nvidia/nvidia.o /lib/nvidia/nvidia.mod.o
+ ld -m $ld_arch -r -o /lib/modules/$(uname -r)/video/fglrx.ko /lib/fglrx/fglrx.o /lib/fglrx/fglrx.mod.o
+ depmod -a &> /dev/null
+ fi
+ fi
+}
+
+# create seed
+rm -f /etc/x-setup-configuration-running
+touch /etc/x-setup-configuration-running
+
+# Prepare Video Cards Proprietary Drivers
+if rogentos_is_live; then
+ runtime_linking_proprietary_drivers
+fi
+/sbin/gpu-configuration &> /dev/null
+
+# delete seed
+rm -f /etc/x-setup-configuration-running