termux-packages/root-packages/hw-probe/hw-probe.pl.patch

80 lines
2.3 KiB
Diff
Raw Permalink Normal View History

2020-02-14 22:08:58 +01:00
--- ./hw-probe.pl.orig 2020-01-15 12:58:41.000000000 +0100
+++ ./hw-probe.pl 2020-02-14 21:30:39.736517524 +0100
@@ -193,7 +193,7 @@
}
}
2019-06-25 22:48:12 +02:00
-my $PROBE_DIR = "/root/HW_PROBE";
+my $PROBE_DIR = "@TERMUX_HOME@/HW_PROBE";
2020-02-14 22:08:58 +01:00
if($Opt{"Snap"}) {
$PROBE_DIR = $ENV{"SNAP_USER_COMMON"}."/HW_PROBE";
@@ -2624,11 +2624,11 @@
$Path = $Opt{"PnpIDs"};
2019-06-25 22:48:12 +02:00
}
else {
- $Path = "/usr/share/hwdata/pnp.ids"; # ROSA Fresh, RELS
+ $Path = "@TERMUX_PREFIX@/share/hwdata/pnp.ids"; # ROSA Fresh, RELS
}
if(not -e $Path) {
- $Path = "/usr/share/misc/pnp.ids"; # ROSA Marathon
+ $Path = "@TERMUX_PREFIX@/share/misc/pnp.ids"; # ROSA Marathon
}
if(not -e $Path) {
2020-02-14 22:08:58 +01:00
@@ -2664,7 +2664,7 @@
2019-06-25 22:48:12 +02:00
sub readVendorIds()
{
- my $Path = "/usr/share/hwdata/pci.ids";
+ my $Path = "@TERMUX_PREFIX@/share/hwdata/pci.ids";
2020-02-14 22:08:58 +01:00
if($Opt{"PciIDs"}) {
$Path = $Opt{"PciIDs"};
@@ -6492,7 +6492,7 @@
else
{
2019-06-25 22:48:12 +02:00
listProbe("logs", "xorg.log");
2020-02-14 22:08:58 +01:00
- $XLog = readFile("/var/log/Xorg.0.log");
+ $XLog = readFile("@TERMUX_PREFIX@/var/log/Xorg.0.log");
if(not $XLog)
{
@@ -10394,7 +10394,7 @@
if(enabledLog("xorg.log.1"))
2019-06-25 22:48:12 +02:00
{
2020-02-14 22:08:58 +01:00
listProbe("logs", "xorg.log.1");
- my $XLog_Old = readFile("/var/log/Xorg.0.log.old");
+ my $XLog_Old = readFile("@TERMUX_PREFIX@/var/log/Xorg.0.log.old");
if(not $XLog_Old)
{
@@ -11233,7 +11233,7 @@
2019-06-25 22:48:12 +02:00
{
2020-02-14 22:08:58 +01:00
my $MAX_P_LEN = 1000;
- my $ELog = "/var/log/cups/error_log";
+ my $ELog = "@TERMUX_PREFIX@/var/log/cups/error_log";
if(enabledLog("cups_error_log") and -e $ELog)
{
listProbe("logs", "cups_error_log");
@@ -11244,7 +11244,7 @@
writeLog($LOG_DIR."/cups_error_log", $CupsError);
}
- my $ALog = "/var/log/cups/access_log";
+ my $ALog = "@TERMUX_PREFIX@/var/log/cups/access_log";
if(enabledLog("cups_access_log") and -e $ALog)
2019-06-25 22:48:12 +02:00
{
2020-02-14 22:08:58 +01:00
listProbe("logs", "cups_access_log");
@@ -12246,7 +12246,7 @@
2019-06-25 22:48:12 +02:00
}
sub readSdioIds_Sys() {
- readSdioIds("/usr/share/hwdata/sdio.ids", \%SdioInfo, \%SdioVendor);
+ readSdioIds("@TERMUX_PREFIX@/share/hwdata/sdio.ids", \%SdioInfo, \%SdioVendor);
}
sub readSdioIds($$$)