mirror of
https://github.com/raspberrypi/rpi-eeprom.git
synced 2026-01-20 21:13:36 +08:00
Implement review comments
Update --apply --edit to allow the eeprom image to be specified. Add some error checking around chmod in rpi-eeprom-update TODO: Test this on NFS
This commit is contained in:
@@ -170,16 +170,20 @@ applyRecoveryUpdate()
|
||||
|| die "Failed to copy ${TMP_EEPROM_IMAGE} to ${BOOTFS}"
|
||||
|
||||
# For NFS mounts ensure that the files are readable to the TFTP user
|
||||
chmod -f go+r "${BOOTFS}/pieeprom.upd" "${BOOTFS}/pieeprom.sig"
|
||||
chmod -f go+r "${BOOTFS}/pieeprom.upd" "${BOOTFS}/pieeprom.sig" \
|
||||
|| die "Failed to set permissions on eeprom update files"
|
||||
fi
|
||||
|
||||
if [ -n "${VL805_UPDATE_IMAGE}" ]; then
|
||||
sha256sum "${VL805_UPDATE_IMAGE}" | awk '{print $1}' > "${BOOTFS}/vl805.sig" \
|
||||
|| die "Failed to create ${BOOTFS}/vl805.sig"
|
||||
cp -f "${VL805_UPDATE_IMAGE}" "${BOOTFS}/vl805.bin"
|
||||
|
||||
cp -f "${VL805_UPDATE_IMAGE}" "${BOOTFS}/vl805.bin" \
|
||||
|| die "Failed to copy ${VL805_UPDATE_IMAGE} to ${BOOTFS/vl805.bin}"
|
||||
|
||||
# For NFS mounts ensure that the files are readable to the TFTP user
|
||||
chmod -f go+r "${BOOTFS}/vl805.bin" "${BOOTFS}/vl805.sig"
|
||||
chmod -f go+r "${BOOTFS}/vl805.bin" "${BOOTFS}/vl805.sig" \
|
||||
|| die "Failed to set permissions on eeprom update files"
|
||||
fi
|
||||
|
||||
cp -f "${RECOVERY_BIN}" "${BOOTFS}/recovery.bin" \
|
||||
|
||||
Reference in New Issue
Block a user