mirror of
https://github.com/kasmtech/KasmVNC.git
synced 2024-11-24 00:53:39 +01:00
vncserver: extract DetectBinariesDir()
This commit is contained in:
parent
fc732f3603
commit
5811e14b42
@ -26,14 +26,7 @@
|
||||
#
|
||||
|
||||
# First make sure we're operating in a sane environment.
|
||||
$exedir = "";
|
||||
$slashndx = rindex($0, "/");
|
||||
if($slashndx>=0) {
|
||||
$exedir = substr($0, 0, $slashndx+1);
|
||||
}
|
||||
if ($exedir =~ m!unix/!) {
|
||||
$exedir = "/usr/bin/";
|
||||
}
|
||||
$exedir = &DetectBinariesDir($0);
|
||||
|
||||
&SanityCheck();
|
||||
|
||||
@ -926,3 +919,17 @@ sub RunXstartup {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
sub DetectBinariesDir {
|
||||
my $result = "";
|
||||
my $slashndx = rindex($0, "/");
|
||||
|
||||
if($slashndx>=0) {
|
||||
$result = substr($0, 0, $slashndx+1);
|
||||
}
|
||||
if ($result =~ m!unix/!) {
|
||||
$result = "/usr/bin/";
|
||||
}
|
||||
|
||||
return $result;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user