summaryrefslogtreecommitdiff
path: root/emulators/linux_SuSE/scripts/linux-rpm.sh
blob: 74123a6b2be90c2f54e34348ae780abd5460177c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
#!/bin/sh
#
# $Id: linux-rpm.sh,v 1.1.1.1 1998/10/31 00:18:47 tron Exp $

OPTS="--root @@EMULDIR@@"
for ARG
do
 if [ "$ARG" = "-i" ]
 then
  OPTS="$OPTS --ignoreos"
 fi
done

if [ `whoami` != root ]
then
 exec rpm $OPTS $*
fi

mkdir -p @@EMULDIR@@/var/tmp
cp -p /etc/spwd.db @@EMULDIR@@/etc
rpm $OPTS $*
RC=$?
rm -rf @@EMULDIR@@/etc/spwd.db @@EMULDIR@@/var/tmp

exit $RC