PiRogueToolSuite / deb-packages

PiRogue Debian packages
https://pts-project.org/
GNU General Public License v3.0
2 stars 2 forks source link

pirogue-flow-inspector: missing check in postinst on WLAN_IFACE #23

Open CyrilBrulebois opened 2 weeks ago

CyrilBrulebois commented 2 weeks ago

Spotted while trying to install pirogue-base within QEMU, with just one Ethernet interface:

kibi@localhost:~$ sudo dpkg --configure -a
Setting up pirogue-flow-inspector (1.1.0) ...
Failed to enable unit: Destination unit default.target is a non-template unit.
dpkg: error processing package pirogue-flow-inspector (--configure):
 installed pirogue-flow-inspector package post-installation script subprocess returned error exit status 1
dpkg: dependency problems prevent configuration of pirogue-base:
 pirogue-base depends on pirogue-flow-inspector; however:
  Package pirogue-flow-inspector is not configured yet.

dpkg: error processing package pirogue-base (--configure):
 dependency problems - leaving unconfigured
Errors were encountered while processing:
 pirogue-flow-inspector
 pirogue-base

Of course we'll need to add support for multiple types of entry points (supporting Wireless, Ethernet, and VPN), but it would be best to have some kind of check and explicit error message if the interface cannot be determined, instead of trying to enable the systemd unit with an empty value after the @ sign (pirogue-flow-inspector@${WLAN_IFACE}).