chris_c_
Active Member
- Joined
- Aug 19, 2010
- Messages
- 509
- Reaction score
- 67
Honestly, I haven't seen any problems with apt-get and the current status setup has been in place for a couple of years. We add stuff with apt-get all the time. What am I missing?
Sometimes apt-get needs to shutdown or start services, for example, the script that upgrades the system package udev. To do this, it issues the command to stop, and waits for udev to actually stop by using the status binary. This will fail and hang if the status command has been replaced by ipbx! My system got stuck on upgrading udev and would've stayed waiting forever, until I figured out what was actually happening, ipbx replaced "status" and broke that operating system feature!
I spent a lot of time wrestling with this when we first set up the Ubuntu build. Here's the problem, and maybe the two of you have an answer. If you do a "normal" /sbin/halt or shutdown -h now, the important stuff doesn't get shutdown properly, i.e. Asterisk, MySQL, and Apache. This led to all sorts of corruption issues if something happened to be going on when the halt command was executed. That's why we initially went to the reboot and halt scripts in /usr/local/sbin to make sure things got closed down gracefully. It's easy enough to change status to statusmenu or some other name in all the builds, but I don't want to introduce corruption problems in the process.
If we can iron out this kink, I'm more than happy to revisit the status naming issue so long as we implement it across all the platforms.
In the meantime, here's the fix but I strongly recommend using the halt and reboot scripts to stop and restart your server!
Code:mv /sbin/statusU /sbin/status mv /usr/local/sbin/status /usr/local/sbin/statusmenu sed -i 's|status |statusmenu |' /root/.profile
The reason the system gets hung up during a "standard" call to "shutdown" is because the operating system calls "status" during the shutdown, to check and see if various services are going down as expected, it needs to wait on that before it does a halt! And instead of receiving expected responses from status, the ipbx status runs a "dialog" binary to display the color text screen, which you never see because the operating system redirects the output to itself, and that dialog binary waits forever for an "enter" which the operating system never hits!