1
0
mirror of https://github.com/j-a-n/raspberrymatic-addon-rmupdate.git synced 2023-10-10 13:37:40 +02:00

Create symlink /usr/local/.firmwareUpdate to firmware directory

This commit is contained in:
Jan Schneider 2018-04-26 23:06:32 +02:00
parent 42ef8f6f74
commit d36ce6ba45

View File

@ -1306,15 +1306,16 @@ proc ::rmupdate::install_firmware {{download_url ""} {version ""} {lang ""} {reb
# Relabel rootfs1 to rootfs
catch { exec tune2fs -L rootfs [get_partition_device [get_system_device] 2] }
}
catch {file mkdir $tmp_dir}
catch {file delete "${tmp_dir}/new_firmware.img"}
catch { file mkdir $tmp_dir }
catch { file delete "${tmp_dir}/new_firmware.img" }
catch { file delete /usr/local/.firmwareUpdate }
if {!$dryrun} {
if {$version == "" || $keep_download == 0} {
file rename -force $firmware_image "${tmp_dir}/new_firmware.img"
} else {
file copy -force $firmware_image "${tmp_dir}/new_firmware.img"
}
catch { exec ln -sf "${tmp_dir}/new_firmware.img" /usr/local/.firmwareUpdate }
catch { exec ln -sf $tmp_dir /usr/local/.firmwareUpdate }
set reboot 1
}
} else {