From eccaf953d4646c90664d9e5a0661c041bec81f97 Mon Sep 17 00:00:00 2001 From: Andreas Guldstrand Date: Wed, 27 Jul 2016 11:19:32 +0200 Subject: sboconfig: make sure to create /etc/sbotools/ if it doesn't exist --- sboconfig | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/sboconfig b/sboconfig index 0dbebb0..ca6d1fa 100755 --- a/sboconfig +++ b/sboconfig @@ -129,6 +129,10 @@ if (exists $changes{SLACKWARE_VERSION}) { sub config_write { script_error('config_write requires at least two arguments.') unless @_ >= 2; + if (! -d $conf_dir) { + mkdir $conf_dir or usage_error("Unable to create $conf_dir. Exiting."); + } + my $conf = slurp($conf_file) || ''; _fixup_conf($conf); -- cgit v1.2.3