27
27
exit 1
28
28
fi
29
29
30
- raspbian=0
31
- raspbian_buster=0
32
- if [ -f /etc/os-release ]
33
- then
34
- pretty=` cat /etc/os-release | grep PRETTY`
35
- if [[ " $pretty " == * " Raspbian" * ]]
36
- then
37
- raspbian=1
30
+ rpios=0
31
+ rpios_recent=0
32
+ if [ -f /etc/os-release ]; then
33
+ if [[ -e /etc/rpi-issue ]]; then
34
+ rpios=1
38
35
fi
39
- if (( raspbian )) && [[ " $pretty " == * " buster " * ]]
40
- then
41
- raspbian_buster =1
36
+ pretty= " $( cat /etc/os-release | grep PRETTY ) "
37
+ if (( rpios )) && [[ ! " $pretty " =~ wheezy | jessie | stretch ]] ; then
38
+ rpios_recent =1
42
39
fi
43
40
fi
44
41
@@ -1320,7 +1317,7 @@ Use -U for unattended even if initializing.
1320
1317
then
1321
1318
printf " %-22s : %s\n" " " \
1322
1319
" Possible options:"
1323
- if (( raspbian ))
1320
+ if (( rpios ))
1324
1321
then
1325
1322
printf " %-22s : %s\n" " " \
1326
1323
" Use -f2 to force a two partition initialize clone."
@@ -1345,7 +1342,7 @@ Use -U for unattended even if initializing.
1345
1342
printf " %-22s : %s\n" " ** WARNING **" \
1346
1343
" All destination disk $dst_disk data will be overwritten!"
1347
1344
1348
- if (( raspbian_buster && p1 _size_new == 0 && src_size_sectors[1 ] < 400000 ))
1345
+ if (( rpios_recent && p1 _size_new == 0 && src_size_sectors[1 ] < 400000 ))
1349
1346
then
1350
1347
printf " %-22s : %s\n" " ** WARNING **" \
1351
1348
" Your source /boot partition is smaller than the"
@@ -1606,7 +1603,7 @@ else
1606
1603
exit 1
1607
1604
fi
1608
1605
1609
- if (( raspbian_buster && dst_size_sectors[1 ] < 500000 ))
1606
+ if (( rpios_recent && dst_size_sectors[1 ] < 500000 ))
1610
1607
then
1611
1608
qprintf " %-22s : %s\n" " ** WARNING **" \
1612
1609
" Your destination /boot partition is smaller than the"
0 commit comments