Sample Header Ad - 728x90

How to schedule a task in a shell script that runs as soon as the all the ancestors of current shell die?

1 vote
1 answer
341 views
I'm making a opkg package for a software update. This package require a reboot after installation and needs some work done after the next reboot. I added a shutdown -h now in postinst script but it seems to shutdown too early and interrupts the opkg install command. Then the opkg system won't have the package info recorded, like opkg list-installed won't list the package as installed. So the problem I'm trying to solve is: how to reliably schedule a shutdown/reboot in postinst script of OPKG package? But I guess the fundamental question is, how to schedule a task in a shell script that runs as soon as the all the ancestors of current shell die, but not sooner than that? Reference: What's postinst script and opkg package management system
Asked by user3528438 (421 rep)
Mar 22, 2016, 11:14 PM
Last activity: Mar 24, 2016, 12:18 AM