diff options
author | lassulus <lass@blue.r> | 2018-09-04 20:53:12 +0200 |
---|---|---|
committer | lassulus <lass@blue.r> | 2018-09-04 20:53:12 +0200 |
commit | 96c4ab61202f515c7a361ef76c398e542771d6b4 (patch) | |
tree | ce2ca90d0ae800bb3ba3e1b05593e7ba7bef104c /makefu/5pkgs/beef/db-in-homedir.patch | |
parent | e183bb1c80c42131f9e3d932985e413ef457f77a (diff) | |
parent | 481376c1509661cbf1bdb17b9887b3a4f0487b6f (diff) |
Merge remote-tracking branch 'gum/master'
Diffstat (limited to 'makefu/5pkgs/beef/db-in-homedir.patch')
-rw-r--r-- | makefu/5pkgs/beef/db-in-homedir.patch | 39 |
1 files changed, 39 insertions, 0 deletions
diff --git a/makefu/5pkgs/beef/db-in-homedir.patch b/makefu/5pkgs/beef/db-in-homedir.patch new file mode 100644 index 000000000..e8dd8e3db --- /dev/null +++ b/makefu/5pkgs/beef/db-in-homedir.patch @@ -0,0 +1,39 @@ +--- /beef 2018-08-16 19:03:55.199437566 +0200 ++++ /beef 2018-08-16 19:27:34.735985233 +0200 +@@ -110,9 +110,20 @@ + # + # @note Database setup - use DataMapper::Logger.new($stdout, :debug) for development debugging + # ++ ++# ++# @note Create ~/.beef/ ++# ++begin ++ FileUtils.mkdir_p($home_dir) unless File.directory?($home_dir) ++rescue => e ++ print_error "Could not create '#{$home_dir}': #{e.message}" ++end ++ + case config.get("beef.database.driver") + when "sqlite" +- DataMapper.setup(:default, "sqlite3://#{$root_dir}/#{config.get("beef.database.db_file")}") ++ print_info "Using Database #{$home_dir}/#{config.get("beef.database.db_file")}" ++ DataMapper.setup(:default, "sqlite3://#{$home_dir}/#{config.get("beef.database.db_file")}") + when "mysql", "postgres" + DataMapper.setup(:default, + :adapter => config.get("beef.database.driver"), +@@ -162,14 +173,6 @@ + BeEF::Core::Console::Banners.print_network_interfaces_count + BeEF::Core::Console::Banners.print_network_interfaces_routes + +-# +-# @note Create ~/.beef/ +-# +-begin +- FileUtils.mkdir_p($home_dir) unless File.directory?($home_dir) +-rescue => e +- print_error "Could not create '#{$home_dir}': #{e.message}" +-end + + # + # @note Check whether we load the Console Shell or not |