mirror of
https://github.com/webmin/webmin.git
synced 2026-05-04 22:30:33 +01:00
Don't rely on backquote_command to split lines
This commit is contained in:
@@ -22,7 +22,8 @@ $package_dir = "/var/db/pkg";
|
||||
sub use_pkg_ng
|
||||
{
|
||||
return 0 if (!-x "/usr/sbin/pkg");
|
||||
local @lines = &backquote_command("/usr/sbin/pkg info 2>/dev/null </dev/null");
|
||||
local @lines = split(/\n/, &backquote_command(
|
||||
"/usr/sbin/pkg info 2>/dev/null </dev/null"));
|
||||
return @lines > 1 ? 1 : 0;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user