Sophie

Sophie

distrib > Mandriva > cs4.0 > x86_64 > by-pkgid > 1be63e4ccb126c40851d83f72198cd05 > scriptlet

arkeia-5.3.12-1.i586.rpm

PREUN

/bin/sh
if [ "$1" = 0 ];
then
    /opt/arkeia/bin/arkboot stop || true
fi

POSTIN

/bin/sh
if [ ! -e /opt/arkeia/arkeiad/admin.cfg ]
then
  hostname >/opt/arkeia/arkeiad/admin.cfg
fi
/opt/arkeia/bin/arkboot start

# If the database contains constructs that are incompatible with version
# 5.3, warn users that they need to run the migration script. Run inside
# "set +e"; this not critical stuff and we don't want an unexpected
# error to prevent users from installing.
(
  set +e
  if									\
    (									\
      find /opt/arkeia/server/dbase/f3tape				\
	| grep '/tp[^/]*/tp[^/]*\.lst$'					\
	| grep -q '^'							\
      && find /opt/arkeia/server/dbase/f3tape			\
	| grep '/tp[^/]*/tp[^/]*\.lst$'					\
	| xargs grep -q '^[[:space:]]*TP_TYPE[[:space:]]*"FILE[^"][^"]*"'\
    )									\
    || ls /opt/arkeia/server						\
      | grep -q '^server_[0-9][0-9]\.jl2$'
  then
    sed 's/^/WARNING: /' <<-EOF
	Your Arkeia backup server database is not in Arkeia 5.3 format.
	Before you use Arkeia 5.3, you should follow the instructions in
	/opt/arkeia/README.migration.
	EOF
    if xargs false </dev/null
    then
      echo
      sed 's/^/WARNING: /' <<-EOF
	Buggy xargs detected; the previous warning may be a false
	positive. In any case, you are advised to install the relevant
	patch from your vendor.
	See http://savannah.gnu.org/bugs/?func=detailitem&item_id=13878
	EOF
    fi
  fi
)