2 # install miscellaneous files
5 echo "Usage: installmisc.sh SRCDIR SETUPDIR BINDDIR SBINDDIR PYTHONDIR"
17 # fixup a python script to use the right path
20 egrep 'sys.path.insert.*bin/python' $f > /dev
/null
&& {
21 sed -i "s|\(sys.path.insert.*\)bin/python\(.*\)$|\1$PYTHONDIR\2|g" $f ||
exit 1
25 echo "Installing setup templates"
26 mkdir
-p $SETUPDIR ||
exit 1
27 mkdir
-p $SBINDIR ||
exit 1
28 mkdir
-p $BINDIR ||
exit 1
29 mkdir
-p $SETUPDIR/ad-schema ||
exit 1
30 mkdir
-p $SETUPDIR/display-specifiers || exit1
31 cp setup
/ad-schema
/*.txt
$SETUPDIR/ad-schema ||
exit 1
32 cp setup
/display-specifiers
/*.txt
$SETUPDIR/display-specifiers ||
exit 1
34 echo "Installing sbin scripts from setup/*"
35 for p
in domainlevel enableaccount newuser provision setexpiry setpassword pwsettings
37 cp setup
/$p $SBINDIR ||
exit 1
39 fix_python_path
$SBINDIR/$p ||
exit 1
42 echo "Installing sbin scripts from scripting/bin/*"
43 for p
in upgradeprovision
45 cp scripting
/bin
/$p $SBINDIR ||
exit 1
47 fix_python_path
$SBINDIR/$p ||
exit 1
50 echo "Installing remaining files in $SETUPDIR"
51 cp setup
/schema-map-
* $SETUPDIR ||
exit 1
52 cp setup
/DB_CONFIG
$SETUPDIR ||
exit 1
53 cp setup
/*.inf
$SETUPDIR ||
exit 1
54 cp setup
/*.ldif
$SETUPDIR ||
exit 1
55 cp setup
/*.reg
$SETUPDIR ||
exit 1
56 cp setup
/*.zone
$SETUPDIR ||
exit 1
57 cp setup
/*.conf
$SETUPDIR ||
exit 1
58 cp setup
/*.php
$SETUPDIR ||
exit 1
59 cp setup
/*.txt
$SETUPDIR ||
exit 1
60 cp setup
/provision.smb.conf.
dc $SETUPDIR ||
exit 1
61 cp setup
/provision.smb.conf.member
$SETUPDIR ||
exit 1
62 cp setup
/provision.smb.conf.standalone
$SETUPDIR ||
exit 1