blob: abc5a76f3de1aad47d0a9709c7d530ff1daabc01 (
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
26
27
28
29
30
31
|
#!/bin/sh
#---------------------------------------------------------------
# Project : Mandriva Linux
# Module : rpm-helper
# File : create-file
# Version : $Id: create-file 219536 2007-05-08 14:54:13Z herton $
# Author : Frederic Lepied
# Created On : Wed Jul 10 15:12:29 2002
# Purpose : helper script for rpm scriptlets to create
# a non existent file.
#---------------------------------------------------------------
if [ $# != 6 ]; then
echo "usage: $0 <pkg name> <num installed> <file> <owner> <group> <mode>" 1>&2
exit 1
fi
pkg=$1 # name of the package
num=$2 # number of packages installed
file=$3 # filename
owner=$4 # owner of the file
group=$5 # group of the file
mode=$6 # mode of the file
if [ ! -f $file ]; then
touch $file
chown $owner:$group $file
chmod $mode $file
fi
# create-file ends here
|