Project

General

Profile

« Previous | Next » 

Revision 7379d80f

Added by Renato Botelho about 10 years ago

Implement pkg_install()

View differences:

etc/inc/pkg-utils.inc
113 113
	return pkg_call("info -e " . $g['pkg_prefix'] . $pkg_name);
114 114
}
115 115

  
116
/* Install package, $pkg_name should not contain prefix */
117
function pkg_install($pkg_name) {
118
	global $g;
119

  
120
	pkg_remove_prefix($pkg_name);
121

  
122
	if (!is_pkg_installed($pkg_name)) {
123
		return pkg_call("install -q -y " . $g['pkg_prefix'] . $pkg_name);
124
	}
125

  
126
	return false;
127
}
128

  
116 129
/* Delete package from FreeBSD, $pkg_name should not contain prefix */
117 130
function pkg_delete($pkg_name) {
118 131
	global $g;

Also available in: Unified diff