summaryrefslogtreecommitdiff
path: root/contrib/aix/buildbff.sh
diff options
context:
space:
mode:
authorDamien Miller <djm@mindrot.org>2003-11-21 23:48:55 +1100
committerDamien Miller <djm@mindrot.org>2003-11-21 23:48:55 +1100
commita8e06cef35c205e1aa562513c6d034a10c8c9a6d (patch)
treecf8bdb4466f553088c020b9179cabd6eaf196075 /contrib/aix/buildbff.sh
parent8c5e91c03fdd2693f0635f8b2a9904bffc94ce16 (diff)
- djm@cvs.openbsd.org 2003/11/21 11:57:03
[everything] unexpand and delete whitespace at EOL; ok markus@ (done locally and RCS IDs synced)
Diffstat (limited to 'contrib/aix/buildbff.sh')
-rwxr-xr-xcontrib/aix/buildbff.sh50
1 files changed, 25 insertions, 25 deletions
diff --git a/contrib/aix/buildbff.sh b/contrib/aix/buildbff.sh
index 727ac446d..4a5c32b0e 100755
--- a/contrib/aix/buildbff.sh
+++ b/contrib/aix/buildbff.sh
@@ -1,12 +1,12 @@
1#!/bin/sh 1#!/bin/sh
2# 2#
3# buildbff.sh: Create AIX SMIT-installable OpenSSH packages 3# buildbff.sh: Create AIX SMIT-installable OpenSSH packages
4# $Id: buildbff.sh,v 1.6 2003/08/25 05:01:04 dtucker Exp $ 4# $Id: buildbff.sh,v 1.7 2003/11/21 12:48:56 djm Exp $
5# 5#
6# Author: Darren Tucker (dtucker at zip dot com dot au) 6# Author: Darren Tucker (dtucker at zip dot com dot au)
7# This file is placed in the public domain and comes with absolutely 7# This file is placed in the public domain and comes with absolutely
8# no warranty. 8# no warranty.
9# 9#
10# Based originally on Ben Lindstrom's buildpkg.sh for Solaris 10# Based originally on Ben Lindstrom's buildpkg.sh for Solaris
11# 11#
12 12
@@ -45,7 +45,7 @@ fi
45if [ ! -f Makefile ] 45if [ ! -f Makefile ]
46then 46then
47 echo "Makefile not found (did you run configure?)" 47 echo "Makefile not found (did you run configure?)"
48 exit 1 48 exit 1
49fi 49fi
50 50
51# 51#
@@ -96,12 +96,12 @@ then
96 PRIVSEP_PATH=/var/empty 96 PRIVSEP_PATH=/var/empty
97fi 97fi
98 98
99# Clean package build directory 99# Clean package build directory
100rm -rf $objdir/$PKGDIR 100rm -rf $objdir/$PKGDIR
101FAKE_ROOT=$objdir/$PKGDIR/root 101FAKE_ROOT=$objdir/$PKGDIR/root
102mkdir -p $FAKE_ROOT 102mkdir -p $FAKE_ROOT
103 103
104# Start by faking root install 104# Start by faking root install
105echo "Faking root install..." 105echo "Faking root install..."
106cd $objdir 106cd $objdir
107make install-nokeys DESTDIR=$FAKE_ROOT 107make install-nokeys DESTDIR=$FAKE_ROOT
@@ -136,15 +136,15 @@ echo "Building BFF for $PKGNAME $VERSION (package version $BFFVERSION)"
136# 136#
137# Set ssh and sshd parameters as per config.local 137# Set ssh and sshd parameters as per config.local
138# 138#
139if [ "${PERMIT_ROOT_LOGIN}" = no ] 139if [ "${PERMIT_ROOT_LOGIN}" = no ]
140then 140then
141 perl -p -i -e "s/#PermitRootLogin yes/PermitRootLogin no/" \ 141 perl -p -i -e "s/#PermitRootLogin yes/PermitRootLogin no/" \
142 $FAKE_ROOT/${sysconfdir}/sshd_config 142 $FAKE_ROOT/${sysconfdir}/sshd_config
143fi 143fi
144if [ "${X11_FORWARDING}" = yes ] 144if [ "${X11_FORWARDING}" = yes ]
145then 145then
146 perl -p -i -e "s/#X11Forwarding no/X11Forwarding yes/" \ 146 perl -p -i -e "s/#X11Forwarding no/X11Forwarding yes/" \
147 $FAKE_ROOT/${sysconfdir}/sshd_config 147 $FAKE_ROOT/${sysconfdir}/sshd_config
148fi 148fi
149 149
150 150
@@ -190,13 +190,13 @@ cat <<EOF >>../openssh.post_i
190echo Creating configs from defaults if necessary. 190echo Creating configs from defaults if necessary.
191for cfgfile in ssh_config sshd_config ssh_prng_cmds 191for cfgfile in ssh_config sshd_config ssh_prng_cmds
192do 192do
193 if [ ! -f $sysconfdir/\$cfgfile ] 193 if [ ! -f $sysconfdir/\$cfgfile ]
194 then 194 then
195 echo "Creating \$cfgfile from default" 195 echo "Creating \$cfgfile from default"
196 cp $sysconfdir/\$cfgfile.default $sysconfdir/\$cfgfile 196 cp $sysconfdir/\$cfgfile.default $sysconfdir/\$cfgfile
197 else 197 else
198 echo "\$cfgfile already exists." 198 echo "\$cfgfile already exists."
199 fi 199 fi
200done 200done
201echo 201echo
202 202
@@ -244,19 +244,19 @@ echo
244# Generate keys unless they already exist 244# Generate keys unless they already exist
245echo Creating host keys if required. 245echo Creating host keys if required.
246if [ -f "$sysconfdir/ssh_host_key" ] ; then 246if [ -f "$sysconfdir/ssh_host_key" ] ; then
247 echo "$sysconfdir/ssh_host_key already exists, skipping." 247 echo "$sysconfdir/ssh_host_key already exists, skipping."
248else 248else
249 $bindir/ssh-keygen -t rsa1 -f $sysconfdir/ssh_host_key -N "" 249 $bindir/ssh-keygen -t rsa1 -f $sysconfdir/ssh_host_key -N ""
250fi 250fi
251if [ -f $sysconfdir/ssh_host_dsa_key ] ; then 251if [ -f $sysconfdir/ssh_host_dsa_key ] ; then
252 echo "$sysconfdir/ssh_host_dsa_key already exists, skipping." 252 echo "$sysconfdir/ssh_host_dsa_key already exists, skipping."
253else 253else
254 $bindir/ssh-keygen -t dsa -f $sysconfdir/ssh_host_dsa_key -N "" 254 $bindir/ssh-keygen -t dsa -f $sysconfdir/ssh_host_dsa_key -N ""
255fi 255fi
256if [ -f $sysconfdir/ssh_host_rsa_key ] ; then 256if [ -f $sysconfdir/ssh_host_rsa_key ] ; then
257 echo "$sysconfdir/ssh_host_rsa_key already exists, skipping." 257 echo "$sysconfdir/ssh_host_rsa_key already exists, skipping."
258else 258else
259 $bindir/ssh-keygen -t rsa -f $sysconfdir/ssh_host_rsa_key -N "" 259 $bindir/ssh-keygen -t rsa -f $sysconfdir/ssh_host_rsa_key -N ""
260fi 260fi
261echo 261echo
262 262
@@ -369,7 +369,7 @@ echo Creating $PKGNAME-$VERSION.bff with backup...
369rm -f $PKGNAME-$VERSION.bff 369rm -f $PKGNAME-$VERSION.bff
370( 370(
371 echo "./lpp_name" 371 echo "./lpp_name"
372 find . ! -name lpp_name -a ! -name . -print 372 find . ! -name lpp_name -a ! -name . -print
373) | backup -i -q -f ../$PKGNAME-$VERSION.bff $filelist 373) | backup -i -q -f ../$PKGNAME-$VERSION.bff $filelist
374 374
375# 375#