memset(command, 0, PATH_MAX);
- snprintf(command, PATH_MAX, "%s%s/%s", nozzle->updownpath, action_str, nozzle->name);
+ snprintf(command, PATH_MAX, "%s/%s/%s", nozzle->updownpath, action_str, nozzle->name);
err = stat(command, &sb);
if (err) {
goto out_clean;
}
+ /*
+ * clear errno from previous calls as there is no errno
+ * returned from execute_bin_sh_command
+ */
+ savederrno = 0;
err = execute_bin_sh_command(command, exec_string);
- savederrno = errno;
+ if (err) {
+ err = -2;
+ }
out_clean:
pthread_mutex_unlock(&config_mutex);
*
* @return
* 0 on success
- * -1 on error and errno is set.
+ * -1 on error and errno is set (sanity checks and internal calls.
+ * -2 on error from executing the shell scripts, and no errno is set.
*/
int nozzle_run_updown(const nozzle_t nozzle, uint8_t action, char **exec_string);
include $(top_srcdir)/build-aux/check.mk
EXTRA_DIST = \
- tap_updown_bad \
- tap_updown_good \
+ nozzle_run_updown_exit_true \
+ nozzle_run_updown_exit_false \
api-test-coverage
noinst_HEADERS = \
api_nozzle_set_mac_test \
api_nozzle_get_handle_by_name_test \
api_nozzle_get_name_by_handle_test \
- api_nozzle_get_fd_test
+ api_nozzle_get_fd_test \
+ api_nozzle_run_updown_test
int_checks = \
int_execute_bin_sh_command_test \
chmod u+x $(top_srcdir)/libnozzle/tests/api-test-coverage
$(top_srcdir)/libnozzle/tests/api-test-coverage $(top_srcdir) $(top_builddir)
-AM_CPPFLAGS = -I$(top_srcdir)/libnozzle -DABSBUILDDIR=\"$(abs_builddir)\"
+AM_CPPFLAGS = -I$(top_srcdir)/libnozzle -DABSBUILDDIR=\"$(abs_builddir)\" -DABSSRCDIR=\"$(abs_srcdir)\"
AM_CFLAGS += $(PTHREAD_CFLAGS) $(libnl_CFLAGS)
LIBS += $(top_builddir)/libnozzle/libnozzle.la $(PTHREAD_LIBS) $(libnl_LIBS)
api_nozzle_get_fd_test_SOURCES = api_nozzle_get_fd.c \
test-common.c
+api_nozzle_run_updown_test_SOURCES = api_nozzle_run_updown.c \
+ test-common.c \
+ ../internals.c
+
int_execute_bin_sh_command_test_SOURCES = int_execute_bin_sh_command.c \
test-common.c \
../internals.c
--- /dev/null
+/*
+ * Copyright (C) 2010-2018 Red Hat, Inc. All rights reserved.
+ *
+ * Author: Fabio M. Di Nitto <fabbione@kronosnet.org>
+ *
+ * This software licensed under GPL-2.0+, LGPL-2.0+
+ */
+
+#include "config.h"
+
+#include <string.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <unistd.h>
+#include <errno.h>
+#include <stdint.h>
+#include <limits.h>
+#include <sys/socket.h>
+#include <sys/stat.h>
+#include <sys/types.h>
+
+#include "test-common.h"
+
+static int test(void)
+{
+ char device_name[IFNAMSIZ];
+ size_t size = IFNAMSIZ;
+ int err=0;
+ nozzle_t nozzle = NULL;
+ char *error_string = NULL;
+ char *tmpdir = NULL;
+ char tmpdirsrc[PATH_MAX];
+ char tmpstr[PATH_MAX*2];
+ char srcfile[PATH_MAX];
+ char dstfile[PATH_MAX];
+
+ /*
+ * create a tmp dir for storing up/down scripts.
+ * we cannot create symlinks src dir
+ */
+ strcpy(tmpdirsrc, ABSBUILDDIR "/nozzle_test_XXXXXX");
+
+ tmpdir = mkdtemp(tmpdirsrc);
+ if (!tmpdir) {
+ printf("Unable to create temporary directory %s for testing: %s\n", tmpdirsrc, strerror(errno));
+ return -1;
+ }
+
+ printf("Created temporary test dir: %s\n", tmpdir);
+
+ printf("Populating test dir...\n");
+
+ snprintf(tmpstr, sizeof(tmpstr) - 1, "%s/pre-up.d", tmpdir);
+ if (mkdir(tmpstr, 0700) < 0) {
+ printf("Unable to create %s/pre-up.d: %s", tmpdir, strerror(errno));
+ err = -1;
+ goto out_clean;
+ }
+
+ snprintf(tmpstr, sizeof(tmpstr) - 1, "%s/up.d", tmpdir);
+ if (mkdir(tmpstr, 0700) < 0) {
+ printf("Unable to create %s/up.d: %s", tmpdir, strerror(errno));
+ err = -1;
+ goto out_clean;
+ }
+
+ snprintf(tmpstr, sizeof(tmpstr) - 1, "%s/down.d", tmpdir);
+ if (mkdir(tmpstr, 0700) < 0) {
+ printf("Unable to create %s/down.d: %s", tmpdir, strerror(errno));
+ err = -1;
+ goto out_clean;
+ }
+
+ snprintf(tmpstr, sizeof(tmpstr) - 1, "%s/post-down.d", tmpdir);
+ if (mkdir(tmpstr, 0700) < 0) {
+ printf("Unable to create %s/post-down.d: %s", tmpdir, strerror(errno));
+ err = -1;
+ goto out_clean;
+ }
+
+ printf("Testing error conditions\n");
+
+ printf("Init nozzle device with no path\n");
+
+ memset(device_name, 0, size);
+ nozzle = nozzle_open(device_name, size, NULL);
+ if (!nozzle) {
+ printf("Unable to init %s\n", device_name);
+ err = -1;
+ goto out_clean;
+ }
+
+ err = nozzle_run_updown(nozzle, NOZZLE_POSTDOWN, &error_string);
+ if ((!err) || (errno != EINVAL)) {
+ printf("nozzle_run_updown sanity check failed\n");
+ err = -1;
+ goto out_clean;
+ }
+
+ nozzle_close(nozzle);
+
+ printf("Init nozzle device with path\n");
+
+ memset(device_name, 0, size);
+ nozzle = nozzle_open(device_name, size, tmpdir);
+ if (!nozzle) {
+ printf("Unable to init %s\n", device_name);
+ err = -1;
+ goto out_clean;
+ }
+
+ printf("Testing invalid nozzle handle\n");
+
+ err = nozzle_run_updown(NULL, NOZZLE_POSTDOWN, &error_string);
+ if ((!err) || (errno != EINVAL)) {
+ printf("nozzle_run_updown sanity check failed\n");
+ err = -1;
+ goto out_clean;
+ }
+
+ printf("Testing invalid action\n");
+
+ err = nozzle_run_updown(nozzle, NOZZLE_POSTDOWN + 1, &error_string);
+ if ((!err) || (errno != EINVAL)) {
+ printf("nozzle_run_updown sanity check failed\n");
+ err = -1;
+ goto out_clean;
+ }
+
+ printf("Testing invalid error string\n");
+
+ err = nozzle_run_updown(nozzle, NOZZLE_POSTDOWN + 1, NULL);
+ if ((!err) || (errno != EINVAL)) {
+ printf("nozzle_run_updown sanity check failed\n");
+ err = -1;
+ goto out_clean;
+ }
+
+ printf("Testing interface pre-up/up/down/post-down (no scripts installed)\n");
+
+ err = nozzle_run_updown(nozzle, NOZZLE_PREUP, &error_string);
+ if (!err) {
+ printf("nozzle_run_updown failed to detect lack of script in pre-up.d\n");
+ err = -1;
+ goto out_clean;
+ } else {
+ if (error_string) {
+ free(error_string);
+ error_string = NULL;
+ }
+ }
+
+ err = nozzle_run_updown(nozzle, NOZZLE_UP, &error_string);
+ if (!err) {
+ printf("nozzle_run_updown failed to detect lack of script in up.d\n");
+ err = -1;
+ goto out_clean;
+ } else {
+ if (error_string) {
+ free(error_string);
+ error_string = NULL;
+ }
+ }
+
+ err = nozzle_run_updown(nozzle, NOZZLE_DOWN, &error_string);
+ if (!err) {
+ printf("nozzle_run_updown failed to detect lack of script in down.d\n");
+ err = -1;
+ goto out_clean;
+ } else {
+ if (error_string) {
+ free(error_string);
+ error_string = NULL;
+ }
+ }
+
+ err = nozzle_run_updown(nozzle, NOZZLE_POSTDOWN, &error_string);
+ if (!err) {
+ printf("nozzle_run_updown failed to detect lack of script in post-down.d\n");
+ err = -1;
+ goto out_clean;
+ } else {
+ if (error_string) {
+ free(error_string);
+ error_string = NULL;
+ }
+ }
+
+ printf("Populating test dir with fail scripts\n");
+
+ snprintf(srcfile, sizeof(srcfile) - 1, "%s/nozzle_run_updown_exit_false", ABSSRCDIR);
+
+ snprintf(dstfile, sizeof(dstfile) - 1, "%s/pre-up.d/%s", tmpdir, device_name);
+ if (link(srcfile, dstfile) < 0) {
+ printf("unable to create symlink\n");
+ err = -1;
+ goto out_clean;
+ }
+
+ snprintf(dstfile, sizeof(dstfile) - 1, "%s/up.d/%s", tmpdir, device_name);
+ if (link(srcfile, dstfile) < 0) {
+ printf("unable to create symlink\n");
+ err = -1;
+ goto out_clean;
+ }
+
+ snprintf(dstfile, sizeof(dstfile) - 1, "%s/down.d/%s", tmpdir, device_name);
+ if (link(srcfile, dstfile) < 0) {
+ printf("unable to create symlink\n");
+ err = -1;
+ goto out_clean;
+ }
+
+ snprintf(dstfile, sizeof(dstfile) - 1, "%s/post-down.d/%s", tmpdir, device_name);
+ if (link(srcfile, dstfile) < 0) {
+ printf("unable to create symlink\n");
+ err = -1;
+ goto out_clean;
+ }
+
+ printf("Testing interface pre-up/up/down/post-down (FAIL scripts installed)\n");
+
+ err = nozzle_run_updown(nozzle, NOZZLE_PREUP, &error_string);
+ if (err != -2) {
+ printf("nozzle_run_updown failed to detect script failure in pre-up.d\n");
+ err = -1;
+ goto out_clean;
+ } else {
+ if (error_string) {
+ free(error_string);
+ error_string = NULL;
+ }
+ }
+
+ err = nozzle_run_updown(nozzle, NOZZLE_UP, &error_string);
+ if (err != -2) {
+ printf("nozzle_run_updown failed to detect script failure in up.d\n");
+ err = -1;
+ goto out_clean;
+ } else {
+ if (error_string) {
+ free(error_string);
+ error_string = NULL;
+ }
+ }
+
+ err = nozzle_run_updown(nozzle, NOZZLE_DOWN, &error_string);
+ if (err != -2) {
+ printf("nozzle_run_updown failed to detect script failure in down.d\n");
+ err = -1;
+ goto out_clean;
+ } else {
+ if (error_string) {
+ free(error_string);
+ error_string = NULL;
+ }
+ }
+
+ err = nozzle_run_updown(nozzle, NOZZLE_POSTDOWN, &error_string);
+ if (err != -2) {
+ printf("nozzle_run_updown failed to detect script failure in post-down.d\n");
+ err = -1;
+ goto out_clean;
+ } else {
+ if (error_string) {
+ free(error_string);
+ error_string = NULL;
+ }
+ }
+
+ printf("Populating test dir with true scripts\n");
+
+ snprintf(srcfile, sizeof(srcfile) - 1, "%s/nozzle_run_updown_exit_true", ABSSRCDIR);
+
+ snprintf(dstfile, sizeof(dstfile) - 1, "%s/pre-up.d/%s", tmpdir, device_name);
+ if (unlink(dstfile) < 0) {
+ printf("unable to remove old symlink\n");
+ err = -1;
+ goto out_clean;
+ }
+ if (link(srcfile, dstfile) < 0) {
+ printf("unable to create symlink\n");
+ err = -1;
+ goto out_clean;
+ }
+
+ snprintf(dstfile, sizeof(dstfile) - 1, "%s/up.d/%s", tmpdir, device_name);
+ if (unlink(dstfile) < 0) {
+ printf("unable to remove old symlink\n");
+ err = -1;
+ goto out_clean;
+ }
+ if (link(srcfile, dstfile) < 0) {
+ printf("unable to create symlink\n");
+ err = -1;
+ goto out_clean;
+ }
+
+ snprintf(dstfile, sizeof(dstfile) - 1, "%s/down.d/%s", tmpdir, device_name);
+ if (unlink(dstfile) < 0) {
+ printf("unable to remove old symlink\n");
+ err = -1;
+ goto out_clean;
+ }
+ if (link(srcfile, dstfile) < 0) {
+ printf("unable to create symlink\n");
+ err = -1;
+ goto out_clean;
+ }
+
+ snprintf(dstfile, sizeof(dstfile) - 1, "%s/post-down.d/%s", tmpdir, device_name);
+ if (unlink(dstfile) < 0) {
+ printf("unable to remove old symlink\n");
+ err = -1;
+ goto out_clean;
+ }
+ if (link(srcfile, dstfile) < 0) {
+ printf("unable to create symlink\n");
+ err = -1;
+ goto out_clean;
+ }
+
+ printf("Testing interface pre-up/up/down/post-down (TRUE scripts installed)\n");
+
+ err = nozzle_run_updown(nozzle, NOZZLE_PREUP, &error_string);
+ if (err) {
+ printf("nozzle_run_updown failed to execute true script in pre-up.d\n");
+ err = -1;
+ goto out_clean;
+ } else {
+ if (error_string) {
+ free(error_string);
+ error_string = NULL;
+ }
+ }
+
+ err = nozzle_run_updown(nozzle, NOZZLE_UP, &error_string);
+ if (err) {
+ printf("nozzle_run_updown failed to execute true script in up.d\n");
+ err = -1;
+ goto out_clean;
+ } else {
+ if (error_string) {
+ free(error_string);
+ error_string = NULL;
+ }
+ }
+
+ err = nozzle_run_updown(nozzle, NOZZLE_DOWN, &error_string);
+ if (err) {
+ printf("nozzle_run_updown failed to execite true script in down.d\n");
+ err = -1;
+ goto out_clean;
+ } else {
+ if (error_string) {
+ free(error_string);
+ error_string = NULL;
+ }
+ }
+
+ err = nozzle_run_updown(nozzle, NOZZLE_POSTDOWN, &error_string);
+ if (err) {
+ printf("nozzle_run_updown failed to execute true script in post-down.d\n");
+ err = -1;
+ goto out_clean;
+ } else {
+ if (error_string) {
+ free(error_string);
+ error_string = NULL;
+ }
+ }
+
+
+out_clean:
+ if (tmpdir) {
+ snprintf(tmpstr, sizeof(tmpstr) - 1, "rm -rf %s", tmpdir);
+ printf("Removing temporary dir: %s\n", tmpstr);
+ err = execute_bin_sh_command(tmpstr, &error_string);
+ if (err) {
+ printf("Error removing directory: %s\n", error_string);
+ }
+ if (error_string) {
+ free(error_string);
+ }
+ }
+ if (nozzle) {
+ nozzle_close(nozzle);
+ }
+
+ return err;
+}
+
+int main(void)
+{
+ need_root();
+
+ if (test() < 0)
+ return FAIL;
+
+ return PASS;
+}
static int test(void)
{
int err = 0;
- char command[4096];
char *error_string = NULL;
- memset(command, 0, sizeof(command));
-
printf("Testing execute_bin_sh_command\n");
printf("command true\n");
--- /dev/null
+#!/bin/bash
+
+#
+# Copyright (C) 2010-2018 Red Hat, Inc. All rights reserved.
+#
+# Author: Fabio M. Di Nitto <fabbione@kronosnet.org>
+#
+# This software licensed under GPL-2.0+, LGPL-2.0+
+#
+
+exit 1
--- /dev/null
+#!/bin/bash
+
+#
+# Copyright (C) 2010-2018 Red Hat, Inc. All rights reserved.
+#
+# Author: Fabio M. Di Nitto <fabbione@kronosnet.org>
+#
+# This software licensed under GPL-2.0+, LGPL-2.0+
+#
+
+exit 0
char testipv6_1[IPBUFSIZE];
char testipv6_2[IPBUFSIZE];
-static int check_knet_up_down(void)
-{
- char verifycmd[1024];
- char device_name[IFNAMSIZ];
- size_t size = IFNAMSIZ;
- int err=0;
- nozzle_t nozzle;
- char *error_string = NULL;
-
- printf("Testing interface up/down\n");
-
- memset(device_name, 0, size);
- nozzle = nozzle_open(device_name, size, NULL);
- if (!nozzle) {
- printf("Unable to init %s\n", device_name);
- return -1;
- }
-
- printf("Put the interface up\n");
-
- err = nozzle_set_up(nozzle);
- if (err < 0) {
- printf("Unable to set interface up\n");
- err = -1;
- goto out_clean;
- }
-
- memset(verifycmd, 0, sizeof(verifycmd));
- snprintf(verifycmd, sizeof(verifycmd)-1,
-#ifdef KNET_LINUX
- "ip addr show dev %s | grep -q UP", nozzle->name);
-#endif
-#ifdef KNET_BSD
- "ifconfig %s | grep -q UP", nozzle->name);
-#endif
- err = execute_bin_sh_command(verifycmd, &error_string);
- if (error_string) {
- printf("Error string: %s\n", error_string);
- free(error_string);
- error_string = NULL;
- }
- if (err < 0) {
- printf("Unable to verify inteface UP\n");
- err = -1;
- goto out_clean;
- }
-
- printf("Put the interface down\n");
-
- err = nozzle_set_down(nozzle);
- if (err < 0) {
- printf("Unable to put the interface down\n");
- err = -1;
- goto out_clean;
- }
-
- memset(verifycmd, 0, sizeof(verifycmd));
- snprintf(verifycmd, sizeof(verifycmd)-1,
-#ifdef KNET_LINUX
- "ip addr show dev %s | grep -q UP", nozzle->name);
-#endif
-#ifdef KNET_BSD
- "ifconfig %s | grep -q UP", nozzle->name);
-#endif
- err = execute_bin_sh_command(verifycmd, &error_string);
- if (error_string) {
- printf("Error string: %s\n", error_string);
- free(error_string);
- error_string = NULL;
- }
- if (!err) {
- printf("Unable to verify inteface DOWN\n");
- err = -1;
- goto out_clean;
- }
-
- nozzle_close(nozzle);
-
- printf("Testing interface pre-up/up/down/post-down (exec errors)\n");
-
- memset(device_name, 0, size);
- nozzle = nozzle_open(device_name, size, ABSBUILDDIR "/nozzle_updown_bad");
- if (!nozzle) {
- printf("Unable to init %s\n", device_name);
- return -1;
- }
-
- printf("Put the interface up\n");
-
- err = nozzle_run_updown(nozzle, NOZZLE_PREUP, &error_string);
- if (err) {
- printf("nozzle_run_updown NOZZLE_PREUP error: %s\n", strerror(errno));
- }
- if (error_string) {
- printf("preup output: %s\n", error_string);
- free(error_string);
- error_string = NULL;
- }
- err = nozzle_set_up(nozzle);
- if (err < 0) {
- printf("Unable to put the interface up\n");
- err = -1;
- goto out_clean;
- }
- err = nozzle_run_updown(nozzle, NOZZLE_UP, &error_string);
- if (err) {
- printf("nozzle_run_updown NOZZLE_UP error: %s\n", strerror(errno));
- }
- if (error_string) {
- printf("up output: %s\n", error_string);
- free(error_string);
- error_string = NULL;
- }
-
- printf("Put the interface down\n");
-
- err = nozzle_run_updown(nozzle, NOZZLE_DOWN, &error_string);
- if (err) {
- printf("nozzle_run_updown NOZZLE_DOWN error: %s\n", strerror(errno));
- }
- if (error_string) {
- printf("down output: %s\n", error_string);
- free(error_string);
- error_string = NULL;
- }
- err = nozzle_set_down(nozzle);
- if (err < 0) {
- printf("Unable to put the interface down\n");
- err = -1;
- goto out_clean;
- }
- err = nozzle_run_updown(nozzle, NOZZLE_POSTDOWN, &error_string);
- if (err) {
- printf("nozzle_run_updown NOZZLE_POSTDOWN error: %s\n", strerror(errno));
- }
- if (error_string) {
- printf("postdown output: %s\n", error_string);
- free(error_string);
- error_string = NULL;
- }
-
- nozzle_close(nozzle);
-
- printf("Testing interface pre-up/up/down/post-down\n");
-
- memset(device_name, 0, size);
-
- nozzle = nozzle_open(device_name, size, ABSBUILDDIR "/nozzle_updown_good");
- if (!nozzle) {
- printf("Unable to init %s\n", device_name);
- return -1;
- }
-
- printf("Put the interface up\n");
-
- err = nozzle_run_updown(nozzle, NOZZLE_PREUP, &error_string);
- if (err) {
- printf("nozzle_run_updown NOZZLE_PREUP error: %s\n", strerror(errno));
- }
- if (error_string) {
- printf("preup output: %s\n", error_string);
- free(error_string);
- error_string = NULL;
- }
- err = nozzle_set_up(nozzle);
- if (err < 0) {
- printf("Unable to put the interface up\n");
- err = -1;
- goto out_clean;
- }
- err = nozzle_run_updown(nozzle, NOZZLE_UP, &error_string);
- if (err) {
- printf("nozzle_run_updown NOZZLE_UP error: %s\n", strerror(errno));
- }
- if (error_string) {
- printf("up output: %s\n", error_string);
- free(error_string);
- error_string = NULL;
- }
-
- printf("Put the interface down\n");
-
- err = nozzle_run_updown(nozzle, NOZZLE_DOWN, &error_string);
- if (err) {
- printf("nozzle_run_updown NOZZLE_DOWN error: %s\n", strerror(errno));
- }
- if (error_string) {
- printf("down output: %s\n", error_string);
- free(error_string);
- error_string = NULL;
- }
- err = nozzle_set_down(nozzle);
- if (err < 0) {
- printf("Unable to put the interface down\n");
- err = -1;
- goto out_clean;
- }
- err = nozzle_run_updown(nozzle, NOZZLE_POSTDOWN, &error_string);
- if (err) {
- printf("nozzle_run_updown NOZZLE_POSTDOWN error: %s\n", strerror(errno));
- }
- if (error_string) {
- printf("postdown output: %s\n", error_string);
- free(error_string);
- error_string = NULL;
- }
-
- nozzle_close(nozzle);
-
- printf("Test ERROR conditions\n");
-
- printf("Pass NULL to nozzle set_up\n");
- err = 0;
- errno = 0;
- if ((nozzle_set_up(NULL) >= 0) || (errno != EINVAL)) {
- printf("Something is wrong in nozzle_set_up sanity checks\n");
- err = -1;
- goto out_clean;
- }
-
- printf("Pass NULL to nozzle set_down\n");
- errno = 0;
- if ((nozzle_set_down(NULL) >= 0) || (errno != EINVAL)) {
- printf("Something is wrong in nozzle_set_down sanity checks\n");
- err = -1;
- goto out_clean;
- }
-
-out_clean:
- nozzle_close(nozzle);
-
- return err;
-}
-
static int check_knet_set_del_ip(void)
{
char device_name[IFNAMSIZ];
make_local_ips(testipv4_1, testipv4_2, testipv6_1, testipv6_2);
- if (check_knet_up_down() < 0)
- return -1;
-
if (check_knet_set_del_ip() < 0)
return -1;
+++ /dev/null
-#!/bin/bash
-
-#
-# Copyright (C) 2010-2018 Red Hat, Inc. All rights reserved.
-#
-# Author: Fabio M. Di Nitto <fabbione@kronosnet.org>
-#
-# This software licensed under GPL-2.0+, LGPL-2.0+
-#
-
-exit 1
+++ /dev/null
-#!/bin/bash
-
-#
-# Copyright (C) 2010-2018 Red Hat, Inc. All rights reserved.
-#
-# Author: Fabio M. Di Nitto <fabbione@kronosnet.org>
-#
-# This software licensed under GPL-2.0+, LGPL-2.0+
-#
-
-exit 1
+++ /dev/null
-#!/bin/bash
-
-#
-# Copyright (C) 2010-2018 Red Hat, Inc. All rights reserved.
-#
-# Author: Fabio M. Di Nitto <fabbione@kronosnet.org>
-#
-# This software licensed under GPL-2.0+, LGPL-2.0+
-#
-
-exit 1
+++ /dev/null
-#!/bin/bash
-
-#
-# Copyright (C) 2010-2018 Red Hat, Inc. All rights reserved.
-#
-# Author: Fabio M. Di Nitto <fabbione@kronosnet.org>
-#
-# This software licensed under GPL-2.0+, LGPL-2.0+
-#
-
-exit 1
+++ /dev/null
-#!/bin/bash
-
-#
-# Copyright (C) 2010-2018 Red Hat, Inc. All rights reserved.
-#
-# Author: Fabio M. Di Nitto <fabbione@kronosnet.org>
-#
-# This software licensed under GPL-2.0+, LGPL-2.0+
-#
-
-exit 0
+++ /dev/null
-#!/bin/bash
-
-#
-# Copyright (C) 2010-2018 Red Hat, Inc. All rights reserved.
-#
-# Author: Fabio M. Di Nitto <fabbione@kronosnet.org>
-#
-# This software licensed under GPL-2.0+, LGPL-2.0+
-#
-
-exit 0
+++ /dev/null
-#!/bin/bash
-
-#
-# Copyright (C) 2010-2018 Red Hat, Inc. All rights reserved.
-#
-# Author: Fabio M. Di Nitto <fabbione@kronosnet.org>
-#
-# This software licensed under GPL-2.0+, LGPL-2.0+
-#
-
-exit 0
+++ /dev/null
-#!/bin/bash
-
-#
-# Copyright (C) 2010-2018 Red Hat, Inc. All rights reserved.
-#
-# Author: Fabio M. Di Nitto <fabbione@kronosnet.org>
-#
-# This software licensed under GPL-2.0+, LGPL-2.0+
-#
-
-exit 0