- utils.sysexec("gpg --homedir=/root --export --armor"
- " --no-default-keyring --keyring {}/usr/boot/pubring.gpg"
- " > {}/etc/pki/rpm-gpg/RPM-GPG-KEY-planetlab".format(SYSIMG_PATH, SYSIMG_PATH), log)
+ # see also myplc/plc.d/gpg
+ utils.sysexec(
+ "type -p gpg1 >& /dev/null && GPG=gpg1 || GPG=gpg; "
+ "$GPG --homedir=/root --export --armor"
+ " --no-default-keyring --keyring {}/usr/boot/pubring.gpg"
+ " > {}/etc/pki/rpm-gpg/RPM-GPG-KEY-planetlab"
+ .format(SYSIMG_PATH, SYSIMG_PATH), log, shell=True)