From 79a2ec160077139cfb9abb68c258157feece76f3 Mon Sep 17 00:00:00 2001 From: Vladimir Sokolovsky Date: Mon, 8 Oct 2007 09:14:20 +0200 Subject: [PATCH] Save the previous version of the 'ofed.conf' if the new one will be created. Signed-off-by: Vladimir Sokolovsky --- install.pl | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/install.pl b/install.pl index 1bcd1fb..e2726c0 100755 --- a/install.pl +++ b/install.pl @@ -1191,6 +1191,16 @@ if ($config_given and $install_option) { print RED "\nError: '-c' option can't be used with '--all|--hpc|--basic'", RESET "\n"; exit 1; } + +if ($config_given and not -e $config) { + print RED "$config does not exist", RESET "\n"; + exit 1; +} + +if (not $config_given and -e $config) { + move($config, "$config.save"); +} + if ($quiet) { $verbose = 0; $verbose2 = 0; -- 2.46.0