-
Notifications
You must be signed in to change notification settings - Fork 2
/
systeminfos.sh
executable file
·1013 lines (702 loc) · 33.9 KB
/
systeminfos.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
#!/bin/sh
LC_ALL=C
LANG=C
LANGUAGE=C
serverURI=https://systeminfo.tuxedo.de/systeminfo.php
infoFileName=systeminfos.txt
lspciFileName=lspcioutput.txt
udevFileName=udevoutput.txt
logFileName=logoutput.txt
normalpackagesFileName=normalpackagesoutput.txt
flatpakpackagesFileName=flatpakpackagesoutput.txt
snappackagesFileName=snappackagesoutput.txt
audioFileName=audiooutput.txt
networkFileName=networkoutput.txt
boardFileName=boardoutput.txt
firmwareFileName=firmwareoutput.txt
tccFileName=tccoutput.txt
modprobeFileName=modprobeoutput.txt
securebootFileName=securebootoutput.txt
tomteFileName=tomteoutput.txt
displayFileName=displayoutput.txt
failogFilename=failogoutput.txt
started=$(date +"%d.%m.%y-%H:%Mh")
ticketnumber=$1
if [ $SYSINFOS_DEBUG -eq 1 ]; then
printf "Running in debug mode\n"
else
SYSINFOS_DEBUG=0
fi
if [ "$(id -u)" -ne 0 ]; then
printf "\e[31msysteminfos.sh muss mit root Rechten ausgefuehrt werden! / systeminfos.sh must be executed with root privileges! \e[1m\n"
printf "\e[37m\e[0m\n"
exec sudo --preserve-env="XDG_SESSION_TYPE,XDG_CURRENT_DESKTOP" su -c "sh '$(basename $0)' $1"
fi
# NOTE: SYSINFOS_DEBUG is only for internal testing purposes.
if [ $SYSINFOS_DEBUG -eq 1 ]; then
printf "Running in debug mode\n"
else
# Check Internet connection
printf "Ueberpruefe Internetverbindung... / Checking Internet connection... \n"
scriptisonline=$(curl -o /dev/null -I -L -s -w "%{http_code}" https://www.tuxedocomputers.com)
if [ $scriptisonline -eq 200 ]; then
printf "\e[32mOnline\e[0m\n"
printf "\e[37m\e[0m\n"
else
printf "\e[31mOffline! Um das Skript ausfuehren zu koennen ist eine Internetverbindung erforderlich! / Offline! An internet connection is required to run the script! \e[1m\n"
printf "Sollten Sie sich in einem Firmennetzwerk befinden, führen Sie das Skript bitte außerhalb des Firmennetzwerkes erneut aus. / If you are in a corporate network, please run the script again outside the corporate network. \n"
printf "In manchen Firmennetzwerken werden Skripte als nicht vertrauenswürdig eingestuft und blockiert. / In some corporate networks, scripts are classified as untrusted and blocked. \n"
printf "\e[37m\e[0m\n"
exit 1
fi
# clear terminal window before printing messages
clear
if [ "$(. /etc/default/locale; echo $LANG)" = "de_DE.UTF-8" ]; then
printf "Das Skript sammelt keinerlei persönliche Daten und keine Zugangsdaten! \n"
printf "Es werden lediglich Informationen über Ihre Hard- und Softwarekonfiguration gesammelt. \n"
printf "Bitte beachten Sie, dass Sie nur für TUXEDO OS und Ubuntu technischen Support von TUXEDO Computers erhalten. \n"
printf "Eventuell auftauchende Fehlermeldungen können Sie ignorieren. \n"
else
printf "The script does not collect any personal data and no access data! \n"
printf "Only information about your hardware and software configuration is collected. \n"
printf "Please note that you will only receive technical support for TUXEDO OS and Ubuntu from TUXEDO Computers. \n"
printf "You can ignore any error messages that may appear. \n"
fi
# 5 seconds before next textbox. Clear screen again before next textbox appears
sleep 5
clear
if [ "$(. /etc/default/locale; echo $LANG)" = "de_DE.UTF-8" ]; then
printf "Wie lautet Ihre Ticketnummer? Mit [ENTER] bestätigen \n"
printf "Die Ticketnummer beginnt mit 99 und ist neun Stellen lang \n"
printf "Eingesendete Systeminformationen ohne gültige Ticketnummer können nicht bearbeitet werden und werden unbearbeitet geschlossen \n"
printf "Um eine Ticketnummer zu erhalten, schreiben Sie uns eine E-Mail an tux[at]tuxedocomputer.com mit Ihrem Anliegen. \n"
else
printf "What is your ticket number? Confirm with [ENTER] \n"
printf "The ticket number starts with 99 and is nine digits long \n"
printf "Submitted system information without a valid ticket number can't be processed and will be closed unprocessed \n"
printf "To get an ticket number you can contact us by e-mail to tux[at]tuxedocomputers.com \n"
fi
if [ -z $ticketnumber ]; then
read -p "Ticket#: " ticketnumber
if [ -z $ticketnumber ]; then
printf "\e[31mKeine Tickernummer angegeben. Beende. / No ticket number given. Quitting. \e[1m\n"
printf "\e[37m\e[0m\n"
exit 1
fi
fi
fi
if [ "$(. /etc/os-release; echo $NAME)" = "TUXEDO OS" ]; then
apt-get update && apt-get -y install curl zip nvme-cli edid-decode efibootmgr lm-sensors jq > /dev/null 2>&1
printf "Installiere benoetigte Abhaengigkeiten. Bitte warten... / Install required dependencies. Please wait... \n"
elif [ "$(. /etc/os-release; echo $NAME)" = "Ubuntu" ]; then
apt-get update && apt-get -y install curl zip nvme-cli edid-decode efibootmgr lm-sensors jq > /dev/null 2>&1
printf "Installiere benoetigte Abhaengigkeiten. Bitte warten... / Install required dependencies. Please wait... \n"
elif [ "$(. /etc/os-release; echo $NAME)" = "elementary OS" ]; then
apt-get update && apt-get -y install curl zip nvme-cli edid-decode efibootmgr lm-sensors jq > /dev/null 2>&1
printf "Installiere benoetigte Abhaengigkeiten. Bitte warten... / Install required dependencies. Please wait... \n"
elif [ "$(. /etc/os-release; echo $NAME)" = "KDE neon" ]; then
apt-get update && apt-get -y install curl zip nvme-cli edid-decode efibootmgr lm-sensors jq > /dev/null 2>&1
printf "Installiere benoetigte Abhaengigkeiten. Bitte warten... / Install required dependencies. Please wait... \n"
elif [ "$(. /etc/os-release; echo $NAME)" = "Linux Mint" ]; then
apt-get update && apt-get -y install curl zip nvme-cli edid-decode efibootmgr lm-sensors jq > /dev/null 2>&1
printf "Installiere benoetigte Abhaengigkeiten. Bitte warten... / Install required dependencies. Please wait... \n"
elif [ "$(. /etc/os-release; echo $NAME)" = "openSUSE Leap" ]; then
zypper in -y curl zip nvme-cli edid-decode efibootmgr lm_sensors jq > /dev/null 2>&1
printf "Installiere benoetigte Abhaengigkeiten. Bitte warten... / Install required dependencies. Please wait... \n"
elif [ "$(. /etc/os-release; echo $NAME)" = "Fedora Linux" ]; then
dnf in -y curl zip nvme-cli edid-decode efibootmgr lm_sensors jq > /dev/null 2>&1
printf "Installiere benoetigte Abhaengigkeiten. Bitte warten... / Install required dependencies. Please wait... \n"
elif [ "$(. /etc/os-release; echo $NAME)" = "Manjaro Linux" ]; then
pacman -Sy --noconfirm curl zip nvme-cli edid-decode efibootmgr lm_sensors jq > /dev/null 2>&1
printf "Installiere benoetigte Abhaengigkeiten. Bitte warten... / Install required dependencies. Please wait... \n"
else
printf "Nicht unterstuetze Distribution! Ueberspringe... / Unsupported Distribution! Skipping... \n"
fi
printf "\n"
if [ $SYSINFOS_DEBUG -eq 1 ]; then
printf "Running in debug mode\n"
else
echo 'Ticketnummer: ' $ticketnumber | tee -a $infoFileName $lspciFileName $udevFileName $logFileName $normalpackagesFileName $audioFileName $networkFileName $boardFileName $firmwareFileName $tccFileName $modprobeFileName $securebootFileName $tomteFileName $displayFileName $failogFilename $flatpakpackagesFileName $snappackagesFileName > /dev/null 2>&1
fi
echo 'systeminfos.sh started at' $started | tee -a $infoFileName $lspciFileName $udevFileName $logFileName $normalpackagesFileName $audioFileName $networkFileName $boardFileName $firmwareFileName $tccFileName $modprobeFileName $securebootFileName $tomteFileName $displayFileName $failogFilename $flatpakpackagesFileName $snappackagesFileName > /dev/null 2>&1
printf "\n\n" | tee -a $infoFileName $lspciFileName $udevFileName $logFileName $normalpackagesFileName $audioFileName $networkFileName $boardFileName $firmwareFileName $tccFileName $modprobeFileName $securebootFileName $tomteFileName $displayFileName $failogFilename $flatpakpackagesFileName $snappackagesFileName > /dev/null 2>&1
### $infoFileName Section
printf "uname -a\n\n" >> $infoFileName
uname -a >> $infoFileName
printf "\n\n\n" >> $infoFileName
printf "lsb_release -a\n\n" >> $infoFileName
lsb_release -a >> $infoFileName
printf "\n\n\n" >> $infoFileName
printf "lscpu\n\n" >> $infoFileName
lscpu >> $infoFileName
printf "\n\n\n" >> $infoFileName
printf "lscpu -e\n\n" >> $infoFileName
lscpu -e >> $infoFileName
printf "\n\n\n" >> $infoFileName
printf "free -h\n\n" >> $infoFileName
free -h >> $infoFileName
printf "\n\n\n" >> $infoFileName
printf "/sys/power/mem_sleep\n\n" >> $infoFileName
cat /sys/power/mem_sleep >> $infoFileName
printf "\n\n\n" >> $infoFileName
printf "lsusb\n\n" >> $infoFileName
lsusb >> $infoFileName
printf "\n\n\n" >> $infoFileName
printf "lsblk\n\n" >> $infoFileName
lsblk -d -o NAME,SIZE,TYPE,TRAN >> $infoFileName
printf "\n\n\n" >> $infoFileName
printf "fstab\n\n" >> $infoFileName
egrep -iv "cifs|nfs|davfs|http" /etc/fstab >> $infoFileName
printf "\n\n\n" >> $infoFileName
printf "disk usage (df -h)\n\n" >> $infoFileName
df -h >> $infoFileName
printf "\n\n\n" >> $infoFileName
printf "xinput\n\n" >> $infoFileName
xinput >> $infoFileName
printf "\n\n\n" >> $infoFileName
printf "/etc/default/grub\n\n" >> $infoFileName
cat /etc/default/grub >> $infoFileName
printf "\n\n\n" >> $infoFileName
printf "/etc/default/grub.d\n\n" >> $infoFileName
cat /etc/default/grub.d/* >> $infoFileName
printf "\n\n\n" >> $infoFileName
printf "lsmod\n\n" >> $infoFileName
lsmod >> $infoFileName
printf "\n\n\n" >> $infoFileName
if [ -f /etc/modprobe.d/tuxedo_keyboard.conf ]; then
printf "tuxedo_keyboard.conf\n\n" >> $infoFileName
cat /etc/modprobe.d/tuxedo_keyboard.conf >> $infoFileName
printf "\n\n\n" >> $infoFileName
else
printf "TUXEDO Keyboard scheint nicht installiert zu sein" >> $infoFileName
printf "\n\n\n" >> $infoFileName
fi
printf "dkms status\n\n" >> $infoFileName
dkms status >> $infoFileName
printf "\n\n\n" >> $infoFileName
printf "upower -d\n\n" >> $infoFileName
upower -d >> $infoFileName
printf "\n\n\n" >> $infoFileName
printf "prime-select query\n\n" >> $infoFileName
prime-select query >> $infoFileName
printf "\n\n\n" >> $infoFileName
printf "XDG_SESSION_TYPE\n\n" >> $infoFileName
echo $XDG_SESSION_TYPE >> $infoFileName
printf "\n\n\n" >> $infoFileName
printf "Desktop\n\n" >> $infoFileName
echo $XDG_CURRENT_DESKTOP >> $infoFileName
printf "\n\n\n" >> $infoFileName
printf "Display-Manager\n\n" >> $infoFileName
cat /etc/systemd/system/display-manager.service >> $infoFileName
printf "\n\n\n" >> $infoFileName
printf "xrandr\n\n" >> $infoFileName
xrandr >> $infoFileName
printf "\n\n\n" >> $infoFileName
printf "lshw\n\n" >> $infoFileName
lshw >> $infoFileName
printf "\n\n\n" >> $infoFileName
printf "journalctl -k --grep=tpm\n\n" >> $infoFileName
journalctl -k --grep=tpm >> $infoFileName
printf "\n\n\n" >> $infoFileName
if [ -d /sys/class/nvme ]; then
printf "nvme list\n\n" >> $infoFileName
nvme list >> $infoFileName
printf "\n\n\n" >> $infoFileName
fi
if [ -d /sys/firmware/efi ]; then
printf "efibootmgr\n\n" >> $infoFileName
efibootmgr -v >> $infoFileName
printf "\n\n\n" >> $infoFileName
else
printf "Es wird Legacy genutzt" >> $infoFileName
printf "\n\n\n" >> $infoFileName
fi
printf "lm-sensors\n\n" >> $infoFileName
sensors >> $infoFileName
printf "\n\n\n" >> $infoFileName
if [ -f /sys/devices/platform/tuxedo_keyboard/charging_profile/charging_profile ]; then
printf "charging_profile\n\n" >> $infoFileName
cat /sys/devices/platform/tuxedo_keyboard/charging_profile/charging_profile >> $infoFileName
printf "\n\n\n" >> $infoFileName
else
printf "Modell unterstuetzt kein charging_profile" >> $infoFileName
printf "\n\n\n" >> $infoFileName
fi
if [ -f /sys/devices/platform/tuxedo_keyboard/charging_priority/charging_prio ]; then
printf "charging_prio\n\n" >> $infoFileName
cat /sys/devices/platform/tuxedo_keyboard/charging_priority/charging_prio >> $infoFileName
printf "\n\n\n" >> $infoFileName
else
printf "Modell unterstuetzt kein charging_prio" >> $infoFileName
printf "\n\n\n" >> $infoFileName
fi
if [ -f /sys/class/power_supply/BAT*/charge_type ]; then
printf "charge_type\n\n" >> $infoFileName
cat /sys/class/power_supply/BAT*/charge_type >> $infoFileName
printf "\n\n\n" >> $infoFileName
printf "charge_control_start_threshold\n\n" >> $infoFileName
cat /sys/class/power_supply/BAT*/charge_control_start_threshold >> $infoFileName
printf "\n\n\n" >> $infoFileName
printf "charge_control_end_threshold\n\n" >> $infoFileName
cat /sys/class/power_supply/BAT*/charge_control_end_threshold >> $infoFileName
printf "\n\n\n" >> $infoFileName
printf "available_start_thresholds\n\n" >> $infoFileName
cat /sys/class/power_supply/BAT*/charge_control_start_available_thresholds >> $infoFileName
printf "\n\n\n" >> $infoFileName
printf "available_end_thresholds\n\n" >> $infoFileName
cat /sys/class/power_supply/BAT*/charge_control_end_available_thresholds >> $infoFileName
printf "\n\n\n" >> $infoFileName
else
printf "Modell unterstuetzt kein Flexicharger" >> $infoFileName
printf "\n\n\n" >> $infoFileName
fi
### $logFileName Section
if [ -f /var/log/tuxedo-install.log ]; then
cat /var/log/tuxedo-install.log >> $failogFilename
else
printf "WebFAI Install-Log konnte nicht gefunden werden.\n" >> $failogFilename
printf "Moeglicherweise handelt es sich um keine WebFAI Installation.\n" >> $failogFilename
fi
if [ -f /var/log/fai-tomte.log ]; then
printf "cat /var/log/fai-tomte.log\n\n" >> $logFileName
cat /var/log/fai-tomte.log >> $logFileName
printf "\n\n\n" >> $logFileName
else
printf "Tomte FAI Log konnte nicht gefunden werden.\n" >> $logFileName
printf "Moeglicherweise handelt es sich nicht um eine WebFAI Installation oder diese Distribution wird nicht von Tomte unterstuetzt.\n" >> $logFileName
printf "\n\n\n" >> $logFileName
fi
if [ -f /var/log/tomte/tomte.log ]; then
printf "/var/log/tomte/tomte.log\n\n" >> $logFileName
tail --lines=1000 /var/log/tomte/tomte.log >> $logFileName
printf "\n\n\n" >> $logFileName
else
printf "Tomte Log konnte nicht gefunden werden.\n" >> $logFileName
printf "Moeglicherweise ist Tomte nicht installiert.\n" >> $logFileName
printf "\n\n\n" >> $logFileName
fi
printf "/var/log/syslog\n\n" >> $logFileName
tail --lines=1000 /var/log/syslog >> $logFileName
printf "\n\n\n\n\n" >> $logFileName
printf "journalctl --system -e\n\n" >> $logFileName
journalctl --system -e >> $logFileName
printf "\n\n\n\n\n" >> $logFileName
printf "/var/log/boot.log\n\n" >> $logFileName
tail --lines=1000 /var/log/boot.log >> $logFileName
printf "\n\n\n\n\n" >> $logFileName
printf "/var/log/Xorg.0.log\n\n" >> $logFileName
if [ $(wc --lines /var/log/Xorg.0.log | cut --delimiter=" " --fields=1) -le 2500 ]; then
cat /var/log/Xorg.0.log >> $logFileName
else
head --lines=1250 /var/log/Xorg.0.log >> $logFileName
echo [...] >> $logFileName
tail --lines=1250 /var/log/Xorg.0.log >> $logFileName
fi
printf "\n\n\n\n\n" >> $logFileName
printf "dmesg\n\n" >> $logFileName
dmesg >> $logFileName
printf "\n\n\n\n\n" >> $logFileName
printf "systemctl status systemd-modules-load.service\n\n" >> $logFileName
systemctl status systemd-modules-load.service >> $logFileName
### $boardFileName Section
printf "BIOS date and time\n\n" >> $boardFileName
cat /sys/class/rtc/rtc0/date >> $boardFileName
printf "\n" >> $boardFileName
cat /sys/class/rtc/rtc0/time >> $boardFileName
printf "\n\n\n" >> $infoFileName
printf "find /sys/class/dmi/id/ -maxdepth 1 -type f -print -exec cat {} \; -exec echo \;\n\n" >> $boardFileName
find /sys/class/dmi/id/ -maxdepth 1 -type f -print -exec cat {} \; -exec echo \; >> $boardFileName
printf "\n\n\n" >> $boardFileName
printf "dmidecode -t memory\n\n" >> $boardFileName
dmidecode -t memory >> $boardFileName
printf "\n\n\n" >> $boardFileName
printf "dmidecode\n\n" >> $boardFileName
dmidecode >> $boardFileName
### $lspciFileName Section
printf "lspci -vvnn\n\n" >> $lspciFileName
lspci -vvnn >> $lspciFileName
### $audioFileName Section
printf "aplay -l\n\n" >> $audioFileName
aplay -l >> $audioFileName
printf "\n\n\n" >> $audioFileName
printf "echo 1 > /sys/module/snd_hda_codec/parameters/dump_coef\n" >> $audioFileName
printf "cat /proc/asound/card*/codec*\n\n" >> $audioFileName
echo 1 > /sys/module/snd_hda_codec/parameters/dump_coef
cat /proc/asound/card*/codec* >> $audioFileName
printf "\n\n\n" >> $audioFileName
printf "lspci -v | grep -A7 -i "audio"\n\n" >> $audioFileName
lspci -v | grep -A7 -i "audio" >> $audioFileName
printf "\n\n\n" >> $audioFileName
printf "pacmd list-sink-inputs\n\n" >> $audioFileName
pacmd list-sink-inputs >> $audioFileName
printf "\n\n\n" >> $audioFileName
printf "pa-info\n\n" >> $audioFileName
pa-info >> $audioFileName
printf "\n\n\n" >> $audioFileName
printf "arecord -l\n\n" >> $audioFileName
arecord -l >> $audioFileName
printf "\n\n\n" >> $audioFileName
printf "fuser -v /dev/snd/*\n\n" >> $audioFileName
fuser -v /dev/snd/* >> $audioFileName
### $networkFileName Section
printf "\n\n\n" >> $networkFileName
echo 'lspci -nnk | grep -E -A3 -i "Ethernet|Network"' >> $networkFileName
printf "\n\n" >> $networkFileName
lspci -nnk | grep -E -A3 -i "Ethernet|Network" >> $networkFileName
printf "\n\n\n" >> $networkFileName
printf "ip addr show\n\n" >> $networkFileName
ip addr show >> $networkFileName
printf "\n\n\n" >> $networkFileName
printf "ip route show\n\n" >> $networkFileName
ip route show >> $networkFileName
printf "\n\n\n" >> $networkFileName
printf "rfkill list\n\n" >> $networkFileName
rfkill list >> $networkFileName
printf "\n\n\n" >> $networkFileName
printf "iwconfig\n\n" >> $networkFileName
iwconfig >> $networkFileName
printf "\n\n\n" >> $networkFileName
printf "mmcli\n\n" >> $networkFileName
mmcli -m 0 | grep -v -e "imei:*" -e "equipment id:*" >> $networkFileName
### $normalpackagesFileName Section
printf "\n\n\n" >> $normalpackagesFileName
# TUXEDO_OS
if [ "$(. /etc/os-release; echo $NAME)" = "TUXEDO OS" ]; then
printf "sources.list\n\n" >> $normalpackagesFileName
cat /etc/apt/sources.list >> $normalpackagesFileName
printf "\n\n\n" >> $normalpackagesFileName
printf "/etc/apt/sources.list.d\n\n" >> $normalpackagesFileName
ls /etc/apt/sources.list.d >> $normalpackagesFileName
printf "\n\n\n" >> $normalpackagesFileName
printf "/etc/apt/sources.list.d ppa\n\n" >> $normalpackagesFileName
cat /etc/apt/sources.list.d/* >> $normalpackagesFileName
printf "\n\n\n" >> $normalpackagesFileName
printf "dpkg -l\n\n" >> $normalpackagesFileName
dpkg -l >> $normalpackagesFileName
printf "\n\n\n" >> $normalpackagesFileName
printf "dpkg -l | grep tuxedo\n\n" >> $normalpackagesFileName
dpkg -l|grep tuxedo >> $normalpackagesFileName
printf "\n\n\n" >> $normalpackagesFileName
printf "dpkg -l | grep nvidia\n\n" >> $normalpackagesFileName
dpkg -l|grep nvidia >> $normalpackagesFileName
printf "\n\n\n" >> $normalpackagesFileName
printf "/var/log/apt/history.log\n\n" >> $normalpackagesFileName
cat /var/log/apt/history.log >> $normalpackagesFileName
# Ubuntu
elif [ "$(. /etc/os-release; echo $NAME)" = "Ubuntu" ]; then
printf "sources.list\n\n" >> $normalpackagesFileName
cat /etc/apt/sources.list >> $normalpackagesFileName
printf "\n\n\n" >> $normalpackagesFileName
printf "/etc/apt/sources.list.d\n\n" >> $normalpackagesFileName
ls /etc/apt/sources.list.d >> $normalpackagesFileName
printf "\n\n\n" >> $normalpackagesFileName
printf "/etc/apt/sources.list.d ppa\n\n" >> $normalpackagesFileName
cat /etc/apt/sources.list.d/* >> $normalpackagesFileName
printf "\n\n\n" >> $normalpackagesFileName
printf "dpkg -l\n\n" >> $normalpackagesFileName
dpkg -l >> $normalpackagesFileName
printf "\n\n\n" >> $normalpackagesFileName
printf "dpkg -l | grep tuxedo\n\n" >> $normalpackagesFileName
dpkg -l|grep tuxedo >> $normalpackagesFileName
printf "\n\n\n" >> $normalpackagesFileName
printf "dpkg -l | grep nvidia\n\n" >> $normalpackagesFileName
dpkg -l|grep nvidia >> $normalpackagesFileName
printf "\n\n\n" >> $normalpackagesFileName
printf "/var/log/apt/history.log\n\n" >> $normalpackagesFileName
cat /var/log/apt/history.log >> $normalpackagesFileName
# elementary OS
elif [ "$(. /etc/os-release; echo $NAME)" = "elementary OS" ]; then
printf "sources.list\n\n" >> $normalpackagesFileName
cat /etc/apt/sources.list >> $normalpackagesFileName
printf "\n\n\n" >> $normalpackagesFileName
printf "/etc/apt/sources.list.d\n\n" >> $normalpackagesFileName
ls /etc/apt/sources.list.d >> $normalpackagesFileName
printf "\n\n\n" >> $normalpackagesFileName
printf "/etc/apt/sources.list.d ppa\n\n" >> $normalpackagesFileName
cat /etc/apt/sources.list.d/* >> $normalpackagesFileName
printf "\n\n\n" >> $normalpackagesFileName
printf "dpkg -l\n\n" >> $normalpackagesFileName
dpkg -l >> $normalpackagesFileName
printf "\n\n\n" >> $normalpackagesFileName
printf "dpkg -l | grep tuxedo\n\n" >> $normalpackagesFileName
dpkg -l|grep tuxedo >> $normalpackagesFileName
printf "\n\n\n" >> $normalpackagesFileName
printf "dpkg -l | grep nvidia\n\n" >> $normalpackagesFileName
dpkg -l|grep nvidia >> $normalpackagesFileName
printf "\n\n\n" >> $normalpackagesFileName
printf "/var/log/apt/history.log\n\n" >> $normalpackagesFileName
cat /var/log/apt/history.log >> $normalpackagesFileName
# KDE neon
elif [ "$(. /etc/os-release; echo $NAME)" = "KDE neon" ]; then
printf "sources.list\n\n" >> $normalpackagesFileName
cat /etc/apt/sources.list >> $normalpackagesFileName
printf "\n\n\n" >> $normalpackagesFileName
printf "/etc/apt/sources.list.d\n\n" >> $normalpackagesFileName
ls /etc/apt/sources.list.d >> $normalpackagesFileName
printf "\n\n\n" >> $normalpackagesFileName
printf "/etc/apt/sources.list.d ppa\n\n" >> $normalpackagesFileName
cat /etc/apt/sources.list.d/* >> $normalpackagesFileName
printf "\n\n\n" >> $normalpackagesFileName
printf "dpkg -l\n\n" >> $normalpackagesFileName
dpkg -l >> $normalpackagesFileName
printf "\n\n\n" >> $normalpackagesFileName
printf "dpkg -l | grep tuxedo\n\n" >> $normalpackagesFileName
dpkg -l|grep tuxedo >> $normalpackagesFileName
printf "\n\n\n" >> $normalpackagesFileName
printf "dpkg -l | grep nvidia\n\n" >> $normalpackagesFileName
dpkg -l|grep nvidia >> $normalpackagesFileName
printf "\n\n\n" >> $normalpackagesFileName
printf "/var/log/apt/history.log\n\n" >> $normalpackagesFileName
cat /var/log/apt/history.log >> $normalpackagesFileName
# Linux Mint
elif [ "$(. /etc/os-release; echo $NAME)" = "Linux Mint" ]; then
printf "sources.list\n\n" >> $normalpackagesFileName
cat /etc/apt/sources.list >> $normalpackagesFileName
printf "\n\n\n" >> $normalpackagesFileName
printf "/etc/apt/sources.list.d\n\n" >> $normalpackagesFileName
ls /etc/apt/sources.list.d >> $normalpackagesFileName
printf "\n\n\n" >> $normalpackagesFileName
printf "/etc/apt/sources.list.d ppa\n\n" >> $normalpackagesFileName
cat /etc/apt/sources.list.d/* >> $normalpackagesFileName
printf "\n\n\n" >> $normalpackagesFileName
printf "dpkg -l\n\n" >> $normalpackagesFileName
dpkg -l >> $normalpackagesFileName
printf "\n\n\n" >> $normalpackagesFileName
printf "dpkg -l | grep tuxedo\n\n" >> $normalpackagesFileName
dpkg -l|grep tuxedo >> $normalpackagesFileName
printf "\n\n\n" >> $normalpackagesFileName
printf "dpkg -l | grep nvidia\n\n" >> $normalpackagesFileName
dpkg -l|grep nvidia >> $normalpackagesFileName
printf "\n\n\n" >> $normalpackagesFileName
printf "/var/log/apt/history.log\n\n" >> $normalpackagesFileName
cat /var/log/apt/history.log >> $normalpackagesFileName
# openSUSE
elif [ "$(. /etc/os-release; echo $NAME)" = "openSUSE Leap" ]; then
printf "/etc/zypp/repos.d\n\n" >> $normalpackagesFileName
ls -al /etc/zypp/repos.d/ >> $normalpackagesFileName
printf "\n\n\n" >> $normalpackagesFileName
printf "zypper sources lists\n\n" >> $normalpackagesFileName
cat /etc/zypp/repos.d/* >> $normalpackagesFileName
printf "\n\n\n" >> $normalpackagesFileName
printf "rpm -qa\n\n" >> $normalpackagesFileName
rpm -qa >> $normalpackagesFileName
printf "\n\n\n" >> $normalpackagesFileName
printf "rpm -qa | grep tuxedo\n\n" >> $normalpackagesFileName
rpm -qa | grep tuxedo >> $normalpackagesFileName
printf "\n\n\n" >> $normalpackagesFileName
printf "rpm -qa | grep nvidia\n\n" >> $normalpackagesFileName
rpm -qa | grep nvidia >> $normalpackagesFileName
printf "\n\n\n" >> $normalpackagesFileName
printf "/var/log/zypp/history\n\n" >> $normalpackagesFileName
cat /var/log/zypp/history >> $normalpackagesFileName
# Fedora
elif [ "$(. /etc/os-release; echo $NAME)" = "Fedora Linux" ]; then
printf "/etc/yum.repos.d\n\n" >> $normalpackagesFileName
ls -al /etc/yum.repos.d/ >> $normalpackagesFileName
printf "\n\n\n" >> $normalpackagesFileName
printf "dnf sources lists\n\n" >> $normalpackagesFileName
cat /etc/yum.repos.d/* >> $normalpackagesFileName
printf "\n\n\n" >> $normalpackagesFileName
printf "rpm -qa\n\n" >> $normalpackagesFileName
rpm -qa >> $normalpackagesFileName
printf "\n\n\n" >> $normalpackagesFileName
printf "rpm -qa | grep tuxedo\n\n" >> $normalpackagesFileName
rpm -qa | grep tuxedo >> $normalpackagesFileName
printf "\n\n\n" >> $normalpackagesFileName
printf "rpm -qa | grep nvidia\n\n" >> $normalpackagesFileName
rpm -qa | grep nvidia >> $normalpackagesFileName
printf "\n\n\n" >> $normalpackagesFileName
printf "/var/log/dnf.log\n\n" >> $normalpackagesFileName
cat /var/log/dnf.log >> $normalpackagesFileName
printf "/var/log/dnf.librepo.log\n\n" >> $normalpackagesFileName
cat /var/log/dnf.librepo.log >> $normalpackagesFileName
printf "/var/log/dnf.rpm.log\n\n" >> $normalpackagesFileName
cat /var/log/dnf.rpm.log >> $normalpackagesFileName
# Manjaro
elif [ "$(. /etc/os-release; echo $NAME)" = "Manjaro Linux" ]; then
printf "cat /etc/pacman.conf" >> $normalpackagesFileName
cat /etc/pacman.conf >> $normalpackagesFileName
printf "\n\n\n" >> $normalpackagesFileName
printf "pacman -Qqe" >> $normalpackagesFileName
pacman -Qqe >> $normalpackagesFileName
printf "pacman -Qqe | grep tuxedo" >> $normalpackagesFileName
pacman -Qqe | grep tuxedo >> $normalpackagesFileName
printf "\n\n\n" >> $normalpackagesFileName
printf "pacman Repo's" >> $normalpackagesFileName
cat /etc/pacman.conf | grep -E 'core|extra|community|multilib' >> $normalpackagesFileName
printf "\n\n\n" >> $normalpackagesFileName
cat /var/log/pacman.log >> $normalpackagesFileName
printf "\n\n\n" >> $normalpackagesFileName
else
printf "Nicht unterstuetze Distribution! Ueberspringe...\n"
printf "Unsupported Distribution! Skipping... \n\n\n"
fi
### flatpakpackagesFileName
printf "flatpak list --app --show-details\n\n" >> $flatpakpackagesFileName
flatpak list >> $flatpakpackagesFileName
### snappackagesFileName
printf "snap list\n\n" >> $snappackagesFileName
snap list >> $snappackagesFileName
### $udevFileName Section
printf "/etc/udev/rules.d/\n\n" >> $udevFileName
ls /etc/udev/rules.d/ >> $udevFileName
printf "\n\n\n" >> $udevFileName
printf "/etc/udev/rules.d/ files\n\n" >> $udevFileName
cat /etc/udev/rules.d/* >> $udevFileName
printf "/lib/udev/rules.d/\n\n" >> $udevFileName
ls /lib/udev/rules.d/ >> $udevFileName
printf "\n\n\n" >> $udevFileName
printf "/lib/udev/rules.d/ files\n\n" >> $udevFileName
cat /lib/udev/rules.d/* >> $udevFileName
# $firmwareFileName Section
printf "ls -l /lib/firmware\n\n" >> $firmwareFileName
ls -l /lib/firmware >> $firmwareFileName
printf "\n\n\n" >> $firmwareFileName
printf "dmesg|grep firmware\n\n" >> $firmwareFileName
dmesg|grep firmware >> $firmwareFileName
# $tccFileName Section
printf "/etc/tcc/settings\n\n" >> $tccFileName
cat /etc/tcc/settings | jq >> $tccFileName
printf "\n\n\n" >> $tccFileName
printf "/etc/tcc/profiless\n\n" >> $tccFileName
cat /etc/tcc/profiles | jq >> $tccFileName
printf "\n\n\n" >> $tccFileName
printf "systemctl is-active tccd.service\n\n" >> $tccFileName
systemctl is-active tccd.service >> $tccFileName
# $modprobeFileName Section
printf "/etc/modprobe.d/\n\n" >> $modprobeFileName
ls /etc/modprobe.d/ >> $modprobeFileName
printf "\n\n\n" >> $modprobeFileName
printf "/etc/modprobe.d/ files\n\n" >> $modprobeFileName
cat /etc/modprobe.d/* >> $modprobeFileName
# $securebootFileName section
printf "mokutil --sb-state\n\n" >> $securebootFileName
mokutil --sb-state >> $securebootFileName
printf "\n\n\n" >> $securebootFileName
printf "mokutil --pk\n\n" >> $securebootFileName
mokutil --pk >> $securebootFileName
printf "\n\n\n" >> $securebootFileName
printf "mokutil --kek\n\n" >> $securebootFileName
mokutil --kek >> $securebootFileName
printf "\n\n\n" >> $securebootFileName
printf "mokutil --db\n\n" >> $securebootFileName
mokutil --db >> $securebootFileName
printf "\n\n\n" >> $securebootFileName
printf "mokutil --dbx\n\n" >> $securebootFileName
mokutil --dbx >> $securebootFileName
printf "\n\n\n" >> $securebootFileName
printf "mokutil --list-enrolled\n\n" >> $securebootFileName
mokutil --list-enrolled >> $securebootFileName
printf "\n\n\n" >> $securebootFileName
printf "mokutil --list-new\n\n" >> $securebootFileName
mokutil --list-new >> $securebootFileName
printf "\n\n\n" >> $securebootFileName
printf "mokutil --list-delete\n\n" >> $securebootFileName
mokutil --list-delete >> $securebootFileName
printf "\n\n\n" >> $securebootFileName
printf "mokutil --mokx\n\n" >> $securebootFileName
mokutil --mokx >> $securebootFileName
printf "\n\n\n" >> $securebootFileName
# $tomteFileName section
printf "tuxedo-tomte list\n\n" >> $tomteFileName
tuxedo-tomte list >> $tomteFileName
printf "\n\n\n" >> $tomteFileName
if [ -f /etc/tomte/AUTOMATIC ]; then
printf "Tomte wird in den vorgesehenen Standardeinstellungen verwendet\n" >> $tomteFileName
printf "\n\n\n" >> $tomteFileName
elif [ -f /etc/tomte/DONT_CONFIGURE ]; then
printf "Tomte ist so konfiguriert, dass nur die als "notwendig" (prerequisite) markierten Module konfiguriert werden\n" >> $tomteFileName
printf "\n\n\n" >> $tomteFileName
elif [ -f /etc/tomte/UPDATES_ONLY ]; then
printf "Tomte ist so konfiguriert, dass nur Aktualisierungen ueber Tomte verarbeitet werden\n" >> $tomteFileName
printf "\n\n\n" >> $tomteFileName
else
printf "Tomte wird in den Standardeinstellungen verwendet\n" >> $tomteFileName
printf "\n\n\n" >> $tomteFileName
fi
# $displayFileName section
printf "glxinfo|grep vendor\n\n" >> $displayFileName
glxinfo|grep vendor >> $displayFileName
printf "\n\n\n" >> $displayFileName
printf "Display Info (/sys/kernel/debug/dri/*/i1915_display_info)\n\n" >> $displayFileName
grep -A 100 "^Connector info" /sys/kernel/debug/dri/*/i915_display_info >> $displayFileName
printf "\n\n\n" >> $displayFileName
printf "Display Info colormgr\n\n"
colormgr get-devices-by-kind display >> $displayFileName
printf "\n\n\n" >> $displayFileName
for f in /sys/class/drm/card*-*/edid; do
ls -la /sys/class/drm/card*-*/edid
printf "\n\n" >> $displayFileName
printf "====================\n" >> $displayFileName
printf "Decoding: %s" $f >> $displayFileName
printf "\n" >> $displayFileName
cat $f | edid-decode >> $displayFileName
printf "====================" >> $displayFileName
done
printf "\n\n\n" >> $displayFileName
# NOTE: SYSINFOS_DEBUG is only for internal testing purposes.
if [ $SYSINFOS_DEBUG -eq 1 ]; then
printf "Running in debug mode\n"
else
# Rename files
mv $infoFileName systeminfos-$ticketnumber.txt
mv $lspciFileName lspci-$ticketnumber.txt
mv $udevFileName udev-$ticketnumber.txt
mv $logFileName log-$ticketnumber.txt
mv $normalpackagesFileName packages-normal-$ticketnumber.txt
mv $flatpakpackagesFileName packages-flatpak-$ticketnumber.txt
mv $snappackagesFileName packages-snap-$ticketnumber.txt
mv $audioFileName audio-$ticketnumber.txt
mv $networkFileName network-$ticketnumber.txt
mv $boardFileName boardinfo-$ticketnumber.txt
mv $firmwareFileName firmware-$ticketnumber.txt
mv $tccFileName tcc-$ticketnumber.txt
mv $modprobeFileName modprobe-$ticketnumber.txt
mv $securebootFileName secureboot-$ticketnumber.txt
mv $tomteFileName tomte-$ticketnumber.txt
mv $displayFileName display-$ticketnumber.txt
mv $failogFilename failog-$ticketnumber.txt
zip -9 systeminfos-$ticketnumber.zip *-$ticketnumber.txt
fi
# NOTE: SYSINFOS_DEBUG is only for internal testing purposes.
if [ $SYSINFOS_DEBUG -eq 1 ]; then
printf "Running in debug mode\n"
else
# Check Internet connection
printf "Ueberpruefe Internetverbindung... / Checking Internet connection... \n"
scriptisonline=$(curl -o /dev/null -I -L -s -w "%{http_code}" https://www.tuxedocomputers.com)
if [ $scriptisonline -eq 200 ]; then
printf "\e[32mOnline\e[0m\n"
printf "\e[37m\e[0m\n"
else
printf "\e[31mOffline! Um die Ergebnisse uebermitteln zu koennen ist eine Internetverbindung erforderlich! / Offline! An Internet connection is required to transmit the results! \e[1m\n"
printf "\e[37m\e[0m\n"
rm systeminfos-$ticketnumber.zip *-$ticketnumber.txt
exit 1
fi
fi
# NOTE: SYSINFOS_DEBUG is only for internal testing purposes.
if [ $SYSINFOS_DEBUG -eq 1 ]; then
unset LC_ALL
unset LANG
unset LANGUAGE
exit 0;
else
curl -k -F "file=@systeminfos-$ticketnumber.zip" $serverURI?ticketnumber=$ticketnumber
rm systeminfos-$ticketnumber.zip *-$ticketnumber.txt
fi
if [ "$(. /etc/default/locale; echo $LANG)" = "de_DE.UTF-8" ]; then
printf "\n"
printf "Systeminfos erfolgreich uebermittelt. \n"
printf "Wir werden die eingesendeten Systeminfos nun auswerten und uns bei Ihnen melden. \n"