diff options
author | Scott Ullrich <sullrich@pfsense.org> | 2007-02-23 17:21:04 +0000 |
---|---|---|
committer | Scott Ullrich <sullrich@pfsense.org> | 2007-02-23 17:21:04 +0000 |
commit | 31e7e1bc119b12df47305f21f79b6505e6215c37 (patch) | |
tree | b9a0882da9ff3ce76fc76da70eb43df6fd30ddd8 /etc/inc/pkg-utils.inc | |
parent | 2f9a19dffc21170a11b587e81c1b157a38561f14 (diff) | |
download | pfsense-31e7e1bc119b12df47305f21f79b6505e6215c37.zip pfsense-31e7e1bc119b12df47305f21f79b6505e6215c37.tar.gz |
Addremove_freebsd_package() so that we can begin using it after 1.0.2 / 1.2 (which ever we decide to call it)
Diffstat (limited to 'etc/inc/pkg-utils.inc')
-rw-r--r-- | etc/inc/pkg-utils.inc | 14 |
1 files changed, 14 insertions, 0 deletions
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. |