aboutsummaryrefslogtreecommitdiffstats
path: root/bin
diff options
context:
space:
mode:
authorDavid Runge <dave@sleepmap.de>2015-10-24 03:44:27 +0200
committerDavid Runge <dave@sleepmap.de>2015-10-24 03:44:27 +0200
commit744597ef012ff72373defc746a2438ec8dd3de4a (patch)
tree322ec7d732e295c9369c7ba88e63d61bb06e0af7 /bin
parent88ce56ac48e9c676f97569ff4c246703a15f2c48 (diff)
downloadrts-744597ef012ff72373defc746a2438ec8dd3de4a.tar.gz
rts-744597ef012ff72373defc746a2438ec8dd3de4a.tar.bz2
rts-744597ef012ff72373defc746a2438ec8dd3de4a.tar.xz
rts-744597ef012ff72373defc746a2438ec8dd3de4a.zip
bin/rts: Making the sourcing of files more failsafe.
Diffstat (limited to 'bin')
-rwxr-xr-xbin/rts14
1 files changed, 11 insertions, 3 deletions
diff --git a/bin/rts b/bin/rts
index 509590b..fcb6c15 100755
--- a/bin/rts
+++ b/bin/rts
@@ -1,8 +1,16 @@
#!/usr/bin/env bash
-#Applies real-time kernel specific settings found in /etc/rts.d/*
+#Applies real-time kernel specific settings found in /etc/rts/*
if [ "$1" ]; then
- . /etc/rts/"$1"
+ if [ -f /etc/rts/"$1" ]; then
+ . /etc/rts/"$1"
+ else
+ exit 1
+ fi
else
- . /etc/rts/rts
+ if [ -f /etc/rts/rts ]; then
+ . /etc/rts/rts
+ else
+ exit 1
+ fi
fi