File tree 1 file changed +8
-2
lines changed
1 file changed +8
-2
lines changed Original file line number Diff line number Diff line change 37
37
fi
38
38
39
39
# Get the correct apt-mirror
40
- REPO=$( grep " URIs:" " $( find /etc/apt/ -type f -name " *sources*" ) " | grep http | awk ' {print $2}' | head -1)
40
+ # Handle several sources
41
+ FIND_SOURCES=" $( find /etc/apt/ -type f -name " *sources*" ) "
42
+ for source in $FIND_SOURCES
43
+ do
44
+ REPO=$( grep " URIs:" " $source " | grep http | awk ' {print $2}' | head -1)
45
+ done
46
+ # Check if it matches
41
47
if [ " $REPO " = ' http://archive.ubuntu.com/ubuntu' ]
42
48
then
43
49
MIRROR_SWITCH=" ON"
@@ -60,7 +66,7 @@ choice=$(whiptail --title "$TITLE" --checklist \
60
66
$CHECKLIST_GUIDE \n\n$RUN_LATER_GUIDE " " $WT_HEIGHT " " $WT_WIDTH " 4 \
61
67
" Keyboard Layout" " (Change the keyboard layout from '$KEYBOARD_LAYOUT ')" " $KEYBOARD_LAYOUT_SWITCH " \
62
68
" Timezone" " (Change the timezone from $( cat /etc/timezone) )" " $TIMEZONE_SWITCH " \
63
- " Locate Mirror" " (Change the apt repo for better download performance)" OFF 3>&1 1>&2 2>&3 )
69
+ " Locate Mirror" " (Change the apt repo for better download performance)" " $MIRROR_SWITCH " 3>&1 1>&2 2>&3 )
64
70
65
71
case " $choice " in
66
72
* " Keyboard Layout" * )
You can’t perform that action at this time.
0 commit comments