FooDeas / raspberrypi-ua-netinst

RaspberryPi (minimal) unattended netinstaller
ISC License
220 stars 45 forks source link

[BUG] APT Configuration in Installer #194

Closed Zuko closed 4 years ago

Zuko commented 4 years ago
# copy apt's sources.list to the target system
echo "Configuring apt:"
echo -n "  Configuring Raspbian repository... "
if [ -e "/rootfs/boot/raspberrypi-ua-netinst/config/apt/sources.list" ]; then
    sed "s/__RELEASE__/${release_raspbian}/g" "/rootfs/boot/raspberrypi-ua-netinst/config/apt/sources.list" > "/rootfs/etc/apt/sources.list" || fail
    cp /rootfs/boot/raspberrypi-ua-netinst/config/apt/sources.list /rootfs/etc/apt/sources.list || fail
else
    sed "s/__RELEASE__/${release_raspbian}/g" "/opt/raspberrypi-ua-netinst/res/etc/apt/sources.list" > "/rootfs/etc/apt/sources.list" || fail
fi

There is a bug in installer.sh. Replacing sources.list has unnecessary cp (line 2068) after sed (replacing __RELEASE__). It's just replace __RELEASE__ and then copy original file to /etc/apt/

Log:

Configuring apt:
  Configuring Raspbian repository... OK
  Checking Raspbian repository entry... 
Error: The installation could not be completed!
FooDeas commented 4 years ago

You're right. Thank you!