From 31e7e1bc119b12df47305f21f79b6505e6215c37 Mon Sep 17 00:00:00 2001 From: Scott Ullrich Date: Fri, 23 Feb 2007 17:21:04 +0000 Subject: Addremove_freebsd_package() so that we can begin using it after 1.0.2 / 1.2 (which ever we decide to call it) --- etc/inc/pkg-utils.inc | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'etc/inc') diff --git a/etc/inc/pkg-utils.inc b/etc/inc/pkg-utils.inc index b89e3db..4059ce8 100644 --- a/etc/inc/pkg-utils.inc +++ b/etc/inc/pkg-utils.inc @@ -45,6 +45,20 @@ if($g['platform'] == "pfSense") { safe_mkdir("/usr/local/pkg/pf"); } +/****f* pkg-utils/remove_package + * NAME + * remove_package - Removes package from FreeBSD if it exists + * INPUTS + * $packagestring - name/string to check for + * RESULT + * none + * NOTES + * + ******/ +function remove_freebsd_package($packagestring) { + exec("cd /var/db/pkg && pkg_delete `ls | grep $packagestring`"); +} + /****f* pkg-utils/is_package_installed * NAME * is_package_installed - Check whether a package is installed. -- cgit v1.1