File tree 1 file changed +18
-0
lines changed
1 file changed +18
-0
lines changed Original file line number Diff line number Diff line change @@ -117,6 +117,9 @@ sub get_operating_system {
117
117
elsif ( $ret eq " ManjaroLinux" ) {
118
118
$ret = " Manjaro" ;
119
119
}
120
+ elsif ( $ret =~ m / Slackware/ i ) {
121
+ $ret = " Slackware" ;
122
+ }
120
123
return $ret ;
121
124
}
122
125
}
@@ -187,6 +190,10 @@ sub get_operating_system {
187
190
return " Manjaro" ;
188
191
}
189
192
193
+ if ( is_file(" /etc/slackware-version" ) ) {
194
+ return " Slackware" ;
195
+ }
196
+
190
197
my $os_string = i_run(" uname -s" );
191
198
return $os_string ; # return the plain os
192
199
@@ -339,6 +346,17 @@ sub get_operating_system_version {
339
346
return $version ;
340
347
}
341
348
}
349
+ elsif ( $op eq ' Slackware' ) {
350
+ my $fh = file_read(" /etc/slackware-version" );
351
+ my $content = $fh -> read_all;
352
+ $fh -> close ;
353
+
354
+ chomp $content ;
355
+
356
+ $content =~ m / (\d +(\. [\d +]+)*)/ ;
357
+
358
+ return $1 ;
359
+ }
342
360
343
361
return [ i_run(" uname -r" ) ]-> [0];
344
362
You can’t perform that action at this time.
0 commit comments