Actions
Bug #1057
closedpostinst and prerm scripts are returning errors
Start date:
24 Oct 2023
Due date:
% Done:
100%
Estimated time:
Severity:
01 - Critical
Description
Both postinst and prerm are returning errors.
root(tty1)$ opkg --force-remove remove lcdshow Removing lcdshow (2.0) from root... * pkg_run_script: package "lcdshow" prerm script returned status 1. root(tty1)$ opkg install lcdshow_2.0_arm.opk Installing lcdshow (2.0) on root. Configuring lcdshow. * pkg_run_script: package "lcdshow" postinst script returned status 1. * opkg_configure: lcdshow.postinst returned 1.
I need to test them manually to see where they are having problems. See /etc/opkg/info.
Updated by Hammel about 1 year ago
- Severity changed from 03 - Medium to 01 - Critical
Updated by Hammel 11 months ago
- Status changed from New to In Progress
- Priority changed from Urgent to Immediate
- % Done changed from 0 to 50
The bug here is that the pibox-hdmi script, which is called from postinst and prerm, used the following syntax:
[[ ${REBOOT} -eq 1 ]] && reboot
REBOOT is set to 0 which causes this line to make the last command result to be 1 on script exit. To fix the problem, the code must be converted to
if [[ ${REBOOT} -eq 1 ]]; then
reboot
fi
Actions