diff options
author | Andreas Guldstrand <andreas.guldstrand@gmail.com> | 2016-07-27 11:19:32 +0200 |
---|---|---|
committer | Andreas Guldstrand <andreas.guldstrand@gmail.com> | 2016-07-27 11:19:32 +0200 |
commit | eccaf953d4646c90664d9e5a0661c041bec81f97 (patch) | |
tree | 44331f25059f280d55e1a3fde36d736c8fe819fd | |
parent | 2e26c48aec83e2961bcc29cdd87de4b35ec479e2 (diff) | |
download | sbotools2-eccaf953d4646c90664d9e5a0661c041bec81f97.tar.xz |
sboconfig: make sure to create /etc/sbotools/ if it doesn't exist
-rwxr-xr-x | sboconfig | 4 |
1 files changed, 4 insertions, 0 deletions
@@ -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); |