diff options
| author | Christy Perez <christy@linux.vnet.ibm.com> | 2015-06-09 14:01:58 -0500 |
|---|---|---|
| committer | Christy Perez <christy@linux.vnet.ibm.com> | 2015-06-17 11:58:17 -0500 |
| commit | 691ed6ef995b8ee7cf9bdcea29ccf4b58a244234 (patch) | |
| tree | 356da2876961622589578dbe6a3ba7845b147514 /hack/make/.integration-daemon-stop | |
| parent | 424bb26b6c7d4042acd388c09a6e412178d87271 (diff) | |
| download | docker-691ed6ef995b8ee7cf9bdcea29ccf4b58a244234.tar.gz | |
Check for apparmor file before reading it
I ran a single integration test and got an error that the file
/sys/module/apparmor/parameters/enabled doesn't exist. I don't have
apparmor installed. So, just check the file first to avoid a confusing
error.
Signed-off-by: Christy Perez <christy@linux.vnet.ibm.com>
Diffstat (limited to 'hack/make/.integration-daemon-stop')
| -rw-r--r-- | hack/make/.integration-daemon-stop | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/hack/make/.integration-daemon-stop b/hack/make/.integration-daemon-stop index 364490bdef..a72f1810bc 100644 --- a/hack/make/.integration-daemon-stop +++ b/hack/make/.integration-daemon-stop @@ -12,7 +12,7 @@ done if [ -z "$DOCKER_TEST_HOST" ]; then # Stop apparmor if it is enabled - if [ "$(cat /sys/module/apparmor/parameters/enabled)" == "Y" ]; then + if [ -e "/sys/module/apparmor/parameters/enabled" ] && [ "$(cat /sys/module/apparmor/parameters/enabled)" == "Y" ]; then ( set -x /etc/init.d/apparmor stop |
