commit eccaf953d4646c90664d9e5a0661c041bec81f97
parent 2e26c48aec83e2961bcc29cdd87de4b35ec479e2
Author: Andreas Guldstrand <andreas.guldstrand@gmail.com>
Date: Wed, 27 Jul 2016 11:19:32 +0200
sboconfig: make sure to create /etc/sbotools/ if it doesn't exist
Diffstat:
1 file changed, 4 insertions(+), 0 deletions(-)
diff --git 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);