mirror of
https://git.proxmox.com/git/pve-common
synced 2025-07-27 13:44:54 +00:00
use package libstring-shellquote-perl
This commit is contained in:
parent
e38bcd3597
commit
7514b23af4
@ -14,6 +14,7 @@ use URI::Escape;
|
|||||||
use Encode;
|
use Encode;
|
||||||
use Digest::SHA1;
|
use Digest::SHA1;
|
||||||
use Text::ParseWords;
|
use Text::ParseWords;
|
||||||
|
use String::ShellQuote;
|
||||||
|
|
||||||
our @EXPORT_OK = qw(
|
our @EXPORT_OK = qw(
|
||||||
lock_file
|
lock_file
|
||||||
@ -691,23 +692,7 @@ sub random_ether_addr {
|
|||||||
sub shellquote {
|
sub shellquote {
|
||||||
my $str = shift;
|
my $str = shift;
|
||||||
|
|
||||||
return "''" if !defined ($str) || ($str eq '');
|
return String::ShellQuote::shell_quote($str);
|
||||||
|
|
||||||
die "unable to quote string containing null (\\000) bytes"
|
|
||||||
if $str =~ m/\x00/;
|
|
||||||
|
|
||||||
# from String::ShellQuote
|
|
||||||
if ($str =~ m|[^\w!%+,\-./:@^]|) {
|
|
||||||
|
|
||||||
# ' -> '\''
|
|
||||||
$str =~ s/'/'\\''/g;
|
|
||||||
|
|
||||||
$str = "'$str'";
|
|
||||||
$str =~ s/^''//;
|
|
||||||
$str =~ s/''$//;
|
|
||||||
}
|
|
||||||
|
|
||||||
return $str;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
# split an shell argument string into an array,
|
# split an shell argument string into an array,
|
||||||
|
2
debian/control
vendored
2
debian/control
vendored
@ -7,6 +7,6 @@ Standards-Version: 3.8.4
|
|||||||
|
|
||||||
Package: libpve-common-perl
|
Package: libpve-common-perl
|
||||||
Architecture: all
|
Architecture: all
|
||||||
Depends: ${perl:Depends} ${misc:Depends}, libdevel-cycle-perl, libwww-perl, libjson-perl, liblinux-inotify2-perl, libio-stringy-perl, liburi-perl, libdigest-sha1-perl
|
Depends: ${perl:Depends} ${misc:Depends}, libdevel-cycle-perl, libwww-perl, libjson-perl, liblinux-inotify2-perl, libio-stringy-perl, liburi-perl, libdigest-sha1-perl, libstring-shellquote-perl
|
||||||
Description: Proxmox VE base library
|
Description: Proxmox VE base library
|
||||||
This package contains the base library used by other Proxmox VE components.
|
This package contains the base library used by other Proxmox VE components.
|
||||||
|
Loading…
Reference in New Issue
Block a user