Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Merge pull request #4 from gtmanfred/master

Clean up your service
  • Loading branch information...
commit 728ace4b0a542d4b9ff2812b02bb149b3440e711 2 parents 5c00911 + 4bddf00
@fredoche authored
Showing with 5 additions and 2 deletions.
  1. +2 −1  install.sh
  2. +3 −1 vgaswitcheroo.service
View
3  install.sh
@@ -1,5 +1,5 @@
#! /bin/sh
-service=$(/bin/ls *.service)
+service=$(*.service)
read -p "Do you want to enable the $service? y/n: "
if [[ $REPLY =~ ^[Yy]$ ]]; then
@@ -12,6 +12,7 @@ read -p "Should we load the radeon module during bootup? y/n: "
if [[ $REPLY =~ ^[Yy]$ ]]; then
echo radeon > /etc/modules-load.d/radeon.conf
echo "The 'radeon' module is now loaded during startup. See /etc/modules-load.d/radeon.conf"
+ echo
fi
read -p "Should we load the radeon module during bootup? y/n: "
View
4 vgaswitcheroo.service
@@ -6,7 +6,9 @@ After=sys-kernel-debug.mount
[Service]
Type=oneshot
RemainAfterExit=yes
-ExecStart=/bin/sh -c "modprobe radeon && echo DIGD > /sys/kernel/debug/vgaswitcheroo/switch && echo OFF > /sys/kernel/debug/vgaswitcheroo/switch"
+ExecStartPre=/usr/bin/modprobe radeon
+ExecStart=/bin/sh -c "echo DIGD > /sys/kernel/debug/vgaswitcheroo/switch"
+ExecStart=/bin/sh -c "echo OFF > /sys/kernel/debug/vgaswitcheroo/switch"
ExecStop=/bin/sh -c "echo ON > /sys/kernel/debug/vgaswitcheroo/switch"
[Install]
Please sign in to comment.
Something went wrong with that request. Please try again.