17 Jul
2012
17 Jul
'12
12:49
Hi to all, Any ideas why a command like ifconfig works when invoked from a %post hook when package is installed via rpm -Uvh but not when same package is installed via zypper from an external repository ? %post IP_LOC=`/sbin/ifconfig | grep "inet adr" | grep -v 127.0.0.1 | awk -F: '{print $2}' | awk '{print $1}' | awk -F. '{print $1"."$2}'` echo $IP_LOC It will return blank if package is installed from zypper (zypper install) and your 2 first digits if installed via rpm -Uvh Thanks for your help / advices -- To unsubscribe, e-mail: opensuse-factory+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-factory+owner@opensuse.org