diff options
author | David Runge <dave@sleepmap.de> | 2015-10-24 03:44:27 +0200 |
---|---|---|
committer | David Runge <dave@sleepmap.de> | 2015-10-24 03:44:27 +0200 |
commit | 744597ef012ff72373defc746a2438ec8dd3de4a (patch) | |
tree | 322ec7d732e295c9369c7ba88e63d61bb06e0af7 /bin | |
parent | 88ce56ac48e9c676f97569ff4c246703a15f2c48 (diff) | |
download | rts-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-x | bin/rts | 14 |
1 files changed, 11 insertions, 3 deletions
@@ -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 |