From 1475a6802f47230c01cf4a37ee5a6686a4718f79 Mon Sep 17 00:00:00 2001 From: ticktock35 Date: Mon, 15 Dec 2008 00:29:02 -0500 Subject: opkg: add a simple way to pass a path environment for pre/post scription execution when in offline mode. Thanks for Christopher Hall git-svn-id: http://opkg.googlecode.com/svn/trunk@155 e8e0d7a0-c8d9-11dd-a880-a1081c7ac358 --- (limited to 'libopkg/opkg_conf.c') diff --git a/libopkg/opkg_conf.c b/libopkg/opkg_conf.c index b61fa3e..99db505 100644 --- a/libopkg/opkg_conf.c +++ b/libopkg/opkg_conf.c @@ -63,6 +63,7 @@ int opkg_init_options_array(const opkg_conf_t *conf, opkg_option_t **options) { "noaction", OPKG_OPT_TYPE_INT, &conf->noaction }, { "nodeps", OPKG_OPT_TYPE_BOOL, &conf->nodeps }, { "offline_root", OPKG_OPT_TYPE_STRING, &conf->offline_root }, + { "offline_root_path", OPKG_OPT_TYPE_STRING, &conf->offline_root_path }, { "offline_root_post_script_cmd", OPKG_OPT_TYPE_STRING, &conf->offline_root_post_script_cmd }, { "offline_root_pre_script_cmd", OPKG_OPT_TYPE_STRING, &conf->offline_root_pre_script_cmd }, { "proxy_passwd", OPKG_OPT_TYPE_STRING, &conf->proxy_passwd }, @@ -266,6 +267,8 @@ int opkg_conf_init(opkg_conf_t *conf, const args_t *args) opkg_conf_override_string(&conf->offline_root, args->offline_root); + opkg_conf_override_string(&conf->offline_root_path, + args->offline_root_path); opkg_conf_override_string(&conf->offline_root_pre_script_cmd, args->offline_root_pre_script_cmd); opkg_conf_override_string(&conf->offline_root_post_script_cmd, @@ -338,6 +341,7 @@ void opkg_conf_deinit(opkg_conf_t *conf) hash_table_deinit(&conf->obs_file_hash); opkg_conf_free_string(&conf->offline_root); + opkg_conf_free_string(&conf->offline_root_path); opkg_conf_free_string(&conf->offline_root_pre_script_cmd); opkg_conf_free_string(&conf->offline_root_post_script_cmd); -- cgit v0.9.1