... % But if a user tries to pass it an option that contains '--' (e.g. % '--user'), rpm returns an error: % [vagrant@localhost ~]$ rpm --eval "%systemd_post --user foo bar" % systemd_post: invalid option -- '-' % error: Unknown option - in systemd_post() % % if [ $1 -eq 1 ] ; then % # Initial installation % systemctl preset >/dev/null 2>&1 || : % fi % % Is this a bug in rpm's parameterized macro handling or should options % containing '--' be passed in a different way? Hi, arguments starting with '-' are treated as macro options, you can workaround it by escaping the first '-' with backslash: $ rpm --eval "%systemd_post \--user foo bar" if [ $1 -eq 1 ] ; then # Initial installation systemctl preset \--user foo bar >/dev/null 2>&1 || : fi (Shell will interpret '\-' as '-'.) Regards, -- Michael Mráka Software Management Engineering, Red Hat _______________________________________________ Rpm-list mailing list Rpm-list@xxxxxxxxxxxxx http://lists.rpm.org/mailman/listinfo/rpm-list