Skip to content

Commit f0e261c

Browse files
authored
Update repo check (#2686)
Signed-off-by: Daniel Hansson <[email protected]>
1 parent f419c90 commit f0e261c

File tree

2 files changed

+1
-1
lines changed

2 files changed

+1
-1
lines changed

lib.sh

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,6 @@ SYSVENDOR=$(cat /sys/devices/virtual/dmi/id/sys_vendor)
4545
# Network
4646
IFACE=$(ip r | grep "default via" | awk '{print $5}')
4747
IFACE2=$(ip -o link show | awk '{print $2,$9}' | grep 'UP' | cut -d ':' -f 1)
48-
REPO=$(grep "^deb " /etc/apt/sources.list | grep http | awk '{print $2}' | head -1)
4948
ADDRESS=$(hostname -I | cut -d ' ' -f 1)
5049
WANIP4=$(curl -s -k -m 5 -4 https://api64.ipify.org)
5150
INTERFACES="/etc/netplan/nextcloud.yaml"

menu/startup_configuration.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@ else
3737
fi
3838

3939
# Get the correct apt-mirror
40+
REPO=$(grep "URIs:" $(find /etc/apt/ -type f -name "*sources*") | grep http | awk '{print $2}' | head -1)
4041
if [ "$REPO" = 'http://archive.ubuntu.com/ubuntu' ]
4142
then
4243
MIRROR_SWITCH="ON"

0 commit comments

Comments
 (0)