Using Java to install a package with dpkg in Debian
I have got an interesting problem.
First I have to tell a little bit about the setting. I have a linux embedded device. I am using Debian with this device. I have made the necessary arrangements so that when I put a USB flash disk with a file update.jar in the USB flash, the device automatically run the command java -jar update.jar and do whatever necessary (create a directory, delete a file etc.). This has been working like a charm till now. But now I have to install a package (openntpd) using this setting. In the update.jar java file I have the command: /usr/bin/dpkg --install /media/usb0/openntpd.deb I expect this to install the package without a problem when I put the USB flash stick. But it doesn't do that. However it does runs the other commands in the update.jar file. So I suspect that the problem is related with dpkg command. The interesting part is when I manually enter the command java -jar /media/usb0/update.jar into the console it does installs the package. any ideas why this would be happenning? |
Just guessing, but perhaps the .deb file is screwed up. dpkg expects to find the .deb file meeting the defined requirements. It gets cranky if something is missing or per spec.
Debian website has requirements for .deb file. I doubt the problem is in dpkg itself. |
Quote:
Just a shot in the dark. |
Quote:
|
I got the error stream now it gets worse:
dpkg - error: PATH is not set. I thought the path for dpkg is /usr/bin/dpkg any comments? |
All times are GMT -5. The time now is 01:14 AM. |