garmin / pyrex

Seamless container setup for developing with OpenEmbedded/Yocto Project
Apache License 2.0
38 stars 30 forks source link

image: guard against userdel/groupdel failing on 0 input arguments #45

Closed matthoosier-garmin closed 4 years ago

matthoosier-garmin commented 4 years ago

Depending on the details of what auxiliary groups or user accounts get made during package installation, it can happen that there are no non-root accounts or no non-root groups.

This trips up the logic that destroys all of those to present a clean slate to the user account creation logic done by the entrypoint.

Rephrase the cleanup operation as a loop rather than an xargs to avoid this.

Signed-off-by: Matt Hoosier matt.hoosier@garmin.com