Project

General

Profile

Actions

Bug #1057

closed

postinst and prerm scripts are returning errors

Added by Hammel about 1 year ago. Updated 11 months ago.

Status:
Closed
Priority:
Immediate
Assignee:
Target version:
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.

Actions #1

Updated by Hammel about 1 year ago

  • Severity changed from 03 - Medium to 01 - Critical
Actions #2

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 #3

Updated by Hammel 11 months ago

  • Status changed from In Progress to Closed
  • % Done changed from 50 to 100

Fix tested successfully on hardware for both install and remove operations.

Code committed and pushed.

Closing issue.

Actions

Also available in: Atom PDF