terminal - Who am i -- RPM-SPEC -
im seek figure out phone call root or sudo,cuz dont want set things in root's home folder, when seek in terminal work perfect, doesnt work spec, im doing wrong?
terminal:[mcfly@mcfly ~]$ whoami=$(who | awk '{print $1}') [mcfly@mcfly ~]$ echo $whoami mcfly spec %define whoami %(who | awk '{print $1}') echo "the user built %{whoami}" user built '%{whoami}' can help me ?
or there easy way know user path in rpm-spec, mean /home/mcfly/ no /root?
regards
what want $sudo_user, variable conveniently set sudo you.
if want ensure root doesn't install, set in %pre:
if [ -z "$sudo_user" ]; echo "please utilize sudo ensure configuration files installed in proper location."; exit 99; fi if [ z"$sudo_user" == "zroot" ]; echo "please utilize sudo non-root business relationship ensure configuration files installed in proper location."; exit 99; fi terminal centos rpm-spec
No comments:
Post a Comment