- if (conf->noaction) return 0;
-
- /* XXX: CLEANUP: There must be a better way to handle maintainer
- scripts when running with offline_root mode and/or a dest other
- than '/'. I've been playing around with some clever chroot
- tricks and I might come up with something workable. */
- /*
- * Attempt to provide a restricted environment for offline operation
- * Need the following set as a minimum:
- * OPKG_OFFLINE_ROOT = absolute path to root dir
- * D = absolute path to root dir (for OE generated postinst)
- * PATH = something safe (a restricted set of utilities)
- */
-
- bool AllowOfflineMode = false;
- if (conf->offline_root) {
- setenv("OPKG_OFFLINE_ROOT", conf->offline_root, 1);
- setenv("D", conf->offline_root, 1);
- if (NULL == conf->offline_root_path || '\0' == conf->offline_root_path[0]) {
- setenv("PATH", "/dev/null", 1);
- } else {
- setenv("PATH", conf->offline_root_path, 1);
- AllowOfflineMode = true;
- }
- }