avoid unnecessary use of bash, and don't use rm -v (gnu extension)

This commit is contained in:
sthen 2015-11-03 13:08:00 +00:00
parent d6e7a677c4
commit b209a2f508
2 changed files with 14 additions and 2 deletions

View File

@ -1,9 +1,9 @@
# $OpenBSD: Makefile,v 1.14 2015/10/12 15:39:06 sthen Exp $
# $OpenBSD: Makefile,v 1.15 2015/11/03 13:08:00 sthen Exp $
COMMENT = auto-discovering network management/monitoring system
V = 201510
REVISION = 0
REVISION = 1
DISTNAME = librenms-$V
DISTFILES = librenms-$V{$V}.tar.gz

View File

@ -0,0 +1,12 @@
$OpenBSD: patch-includes_functions_php,v 1.1 2015/11/03 13:08:00 sthen Exp $
--- includes/functions.php.orig Tue Nov 3 13:05:19 2015
+++ includes/functions.php Tue Nov 3 13:05:42 2015
@@ -228,7 +228,7 @@ function delete_device($id) {
}
}
- $ex = shell_exec("bash -c '( [ ! -d ".trim($config['rrd_dir'])."/".$host." ] || rm -vrf ".trim($config['rrd_dir'])."/".$host." 2>&1 ) && echo -n OK'");
+ $ex = shell_exec("sh -c '( [ ! -d ".trim($config['rrd_dir'])."/".$host." ] || rm -rf ".trim($config['rrd_dir'])."/".$host." 2>&1 ) && echo -n OK'");
$tmp = explode("\n",$ex);
if( $tmp[sizeof($tmp)-1] != "OK" ) {
$ret .= "Could not remove files:\n$ex\n";