On Thu, Mar 08, 2012 at 01:39:02AM +0100, Christian Boltz wrote:
Am Mittwoch, 7. M?rz 2012 schrieb Lutz Thuns:
I'm thinking of following %post section:
%post # backup old configuration files to new location if [ -d /etc/default/wbar ]; then for i in /etc/default/wbar/*; do
AFAIK the paths in %post scripts shouldn't start with / and instead assume that you are in / - so your script should be
if [ -d etc/default/wbar ]; then for i in etc/default/wbar/*; do
Using /etc in the script will probably break if rpm --root is used (in other words: when booting the installation system from DVD)
Uh, a long time ago old yast called scriptlets after cd'ing into the root directory, but those dark times are over. Rpm always uses a chroot() before running a scriplet, so using an absolute path is the prefered way. Cheers, Michael. -- Michael Schroeder mls@suse.de SUSE LINUX Products GmbH, GF Jeff Hawn, HRB 16746 AG Nuernberg main(_){while(_=~getchar())putchar(~_-1/(~(_|32)/13*2-11)*13);} -- To unsubscribe, e-mail: opensuse-packaging+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-packaging+owner@opensuse.org