Skip to content

Commit c5bbedd

Browse files
committed
Update yad dialog
1 parent 794a46d commit c5bbedd

6 files changed

Lines changed: 60 additions & 350 deletions

File tree

biglinux-livecd/usr/bin/isocheck.sh

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -25,12 +25,11 @@ if [ -f /lib/live/mount/medium/md5sum.txt ];then
2525
fi
2626
done < /lib/live/mount/medium/md5sum.txt
2727
fi
28-
) | dialog --title "check md5..." --gauge "starting to check md5... \n\n Verificando integridade do sistema..." 6 100 0
28+
) | dialog --title "check md5..." --gauge "starting to check md5..." 6 100 0
2929
if [ -f /tmp/check_failed ];then
3030
value=`cat /tmp/check_failed`
31-
dialog --title "check md5" --msgbox "checksum failed \n $value \n\n O sistema esta corrompido" 10 60
31+
dialog --title "check md5" --msgbox "checksum failed \n $value" 10 60
3232
else
33-
dialog --title "check md5" --msgbox "checksum success \n\n Nenhum erro encontrado" 10 20
33+
dialog --title "check md5" --msgbox "checksum success" 10 20
3434
fi
35-
echo 1 > /proc/sys/kernel/sysrq
36-
echo b > /proc/sysrq-trigger
35+

biglinux-livecd/usr/share/bigbashview/apps/livecd/biglinux-verify-md5sum.sh

Lines changed: 12 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,10 @@
99
# Licensed by GPL V2 or greater
1010
##################################
1111

12+
if [[ $(pgrep -c biglinux-verify) > 1 ]]; then
13+
exit
14+
fi
15+
1216
export LANGUAGE=$(cat /tmp/big_language).UTF-8
1317
export LANG=$(cat /tmp/big_language).UTF-8
1418

@@ -18,47 +22,48 @@ export TEXTDOMAIN=biglinux-livecd
1822

1923
File="/tmp/checksum_biglinux.html"
2024
FileVerified="/tmp/checksum_biglinux_ok.html"
25+
ScriptFolder="${0%/*}"
2126

2227
if [ ! -e $FileVerified ]; then
2328

2429
###### Detecting folder with files
2530
# Try with manjaro folder
2631
if [[ -e /run/miso/bootmnt/manjaro/x86_64/ ]]; then
27-
cd /run/miso/bootmnt/manjaro/x86_64/
32+
cd /run/miso/bootmnt/manjaro/x86_64/
2833

2934
# Try with folder same as HOSTNAME
3035
elif [[ -e /run/miso/bootmnt/$HOSTNAME/x86_64/ ]]; then
31-
cd /run/miso/bootmnt/$HOSTNAME/x86_64/
36+
cd /run/miso/bootmnt/$HOSTNAME/x86_64/
3237

3338
# Try folder removing efi and boot folder
3439
elif [[ -e $(ls -d1 /run/miso/bootmnt/*/ | grep -ve '/efi/' -ve '/boot/') ]]; then
35-
cd $(ls -d1 /run/miso/bootmnt/*/ | grep -ve '/efi/' -ve '/boot/')
40+
cd $(ls -d1 /run/miso/bootmnt/*/ | grep -ve '/efi/' -ve '/boot/')
3641
fi
3742
######
3843

3944
rm -f $File
4045

4146
md5sum --status -c desktopfs.md5
4247
if [ "$?" != "0" ] ; then
43-
./md5error.sh
48+
$ScriptFolder/md5error.sh
4449
exit
4550
fi
4651

4752
md5sum --status -c livefs.md5
4853
if [ "$?" != "0" ] ; then
49-
./md5error.sh
54+
$ScriptFolder/md5error.sh
5055
exit
5156
fi
5257

5358
md5sum --status -c mhwdfs.md5
5459
if [ "$?" != "0" ] ; then
55-
./md5error.sh
60+
$ScriptFolder/md5error.sh
5661
exit
5762
fi
5863

5964
md5sum --status -c rootfs.md5
6065
if [ "$?" != "0" ] ; then
61-
./md5error.sh
66+
$ScriptFolder/md5error.sh
6267
exit
6368
fi
6469
fi

biglinux-livecd/usr/share/bigbashview/apps/livecd/md5error.sh

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,15 +9,15 @@
99
# Licensed by GPL V2 or greater
1010
##################################
1111

12-
export LANGUAGE=$(cat /tmp/big_language).UTF-8
13-
export LANG=$(cat /tmp/big_language).UTF-8
12+
export LANGUAGE=$(</tmp/big_language).UTF-8
13+
export LANG=$(</tmp/big_language).UTF-8
1414

1515
#Translation
1616
export TEXTDOMAINDIR="/usr/share/locale"
1717
export TEXTDOMAIN=biglinux-livecd
1818

1919

20-
yad --window-icon=gtk-no --width=450 --height=300 --fixed --infobox --text-align=left --text=$"
20+
WAYLAND_DISPLAY= yad --window-icon=gtk-no --width=450 --height=300 --fixed --infobox --text-align=left --text=$"
2121
<big><big>Oops</big></big>
2222
Integrity check failed, it is necessary to download the system again or use another USB drive.
2323

biglinux-livecd/usr/share/biglinux/livecd/script/biglinux-verify-md5sum.sh

Lines changed: 16 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,55 +9,66 @@
99
# Licensed by GPL V2 or greater
1010
##################################
1111

12-
export LANGUAGE=$(cat /tmp/big_language).UTF-8
13-
export LANG=$(cat /tmp/big_language).UTF-8
12+
if [[ $(pgrep -c biglinux-verify) > 1 ]]; then
13+
exit
14+
fi
15+
16+
if [[ -e /tmp/big_language ]]; then
17+
export LANGUAGE=$(</tmp/big_language).UTF-8
18+
export LANG=$(</tmp/big_language).UTF-8
19+
fi
1420

1521
#Translation
1622
export TEXTDOMAINDIR="/usr/share/locale"
1723
export TEXTDOMAIN=biglinux-livecd
1824

1925
File="/tmp/checksum_biglinux.html"
2026
FileVerified="/tmp/checksum_biglinux_ok.html"
27+
ScriptFolder="${0%/*}"
2128

2229
if [ ! -e $FileVerified ]; then
2330

2431
###### Detecting folder with files
2532
# Try with manjaro folder
2633
if [[ -e /run/miso/bootmnt/manjaro/x86_64/ ]]; then
27-
cd /run/miso/bootmnt/manjaro/x86_64/
34+
cd /run/miso/bootmnt/manjaro/x86_64/
2835

2936
# Try with folder same as HOSTNAME
3037
elif [[ -e /run/miso/bootmnt/$HOSTNAME/x86_64/ ]]; then
31-
cd /run/miso/bootmnt/$HOSTNAME/x86_64/
38+
cd /run/miso/bootmnt/$HOSTNAME/x86_64/
3239

3340
# Try folder removing efi and boot folder
3441
elif [[ -e $(ls -d1 /run/miso/bootmnt/*/ | grep -ve '/efi/' -ve '/boot/') ]]; then
35-
cd $(ls -d1 /run/miso/bootmnt/*/ | grep -ve '/efi/' -ve '/boot/')
42+
cd $(ls -d1 /run/miso/bootmnt/*/ | grep -ve '/efi/' -ve '/boot/')
3643
fi
3744
######
3845

3946
rm -f $File
4047

4148
md5sum --status -c desktopfs.md5
4249
if [ "$?" != "0" ] ; then
50+
cd "$ScriptFolder"
4351
./md5error.sh
4452
exit
4553
fi
4654

4755
md5sum --status -c livefs.md5
4856
if [ "$?" != "0" ] ; then
57+
cd "$ScriptFolder"
4958
./md5error.sh
5059
exit
5160
fi
5261

5362
md5sum --status -c mhwdfs.md5
5463
if [ "$?" != "0" ] ; then
64+
cd "$ScriptFolder"
5565
./md5error.sh
5666
exit
5767
fi
5868

5969
md5sum --status -c rootfs.md5
6070
if [ "$?" != "0" ] ; then
71+
cd "$ScriptFolder"
6172
./md5error.sh
6273
exit
6374
fi

0 commit comments

Comments
 (0)