5 # The contents of this file are subject to the terms of the
6 # Common Development and Distribution License, Version 1.0 only
7 # (the "License"). You may not use this file except in compliance
10 # You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
11 # or http://www.opensolaris.org/os/licensing.
12 # See the License for the specific language governing permissions
13 # and limitations under the License.
15 # When distributing Covered Code, include this CDDL HEADER in each
16 # file and include the License file at usr/src/OPENSOLARIS.LICENSE.
17 # If applicable, add the following below this CDDL HEADER, with the
18 # fields enclosed by brackets "[]" replaced with your own identifying
19 # information: Portions Copyright [yyyy] [name of copyright owner]
23 #ident "%Z%%M% %I% %E% SMI" /* from SVR4 bnu:SetUp 2.3.1.9 */
25 # a function to do the dirty work
27 # needit OWNER GROUP MODE name oldname
30 if [ ! -f $ETC/$4 ]; then
31 if [ -f $LIB/$4 ]; then
34 if [ -n "$5" -a -f $LIB/$5 ]; then
45 $SYMLINK $ETC/$4 $LIB/$4
53 # This shell tries to set up all needed uucp database files.
54 # Since the names changed from previous versions, it copies those.
55 # For the Permissions, it will generate one if none exists
57 LIB
=$ROOT/usr
/lib
/uucp
63 DBFILES
="Config Devconfig Devices Dialcodes Dialers Grades Limits Permissions Poll Sysfiles Systems"
67 # For cross environment, just take default files, and exit.
75 $SYMLINK $ETC/$i $LIB/$i
80 # For real environment, try to preserve user's database files
82 needit
$OWNER $GROUP 644 Config
83 needit
$OWNER $GROUP 644 Devconfig
84 needit
$OWNER $GROUP 644 Devices L-devices
85 needit
$OWNER $GROUP 644 Dialcodes L-dialcodes
86 needit
$OWNER $GROUP 644 Dialers L-dialers
87 needit
$OWNER $GROUP 644 Grades
88 needit
$OWNER $GROUP 644 Limits
89 needit
$OWNER $GROUP 644 Poll
90 needit
$OWNER $GROUP 644 Sysfiles
91 needit
$OWNER $GROUP 600 Systems L.sys
93 # Permissions is handles differently
94 if [ ! -f $ETC/Permissions
]; then
95 if [ -f $LIB/Permissions
]; then
96 cp $LIB/Permissions
$ETC/Permissions
98 if [ -f $ETC/PERMISSIONS
]; then
99 cp $ETC/PERMISSIONS
$ETC/Permissions
101 # Try to generate a Permissions file
102 # using uucp entries in /etc/passwd
104 set - `sed -n "/uucico/s/:.*//p" /etc/passwd`
107 echo "\tLOGNAME=$i\n"
108 done > $ETC/Permissions
112 chown
$OWNER $ETC/Permissions
113 chgrp
$GROUP $ETC/Permissions
114 chmod 600 $ETC/Permissions
115 rm -rf $LIB/Permissions
116 $SYMLINK $ETC/Permissions
$LIB/Permissions