summaryrefslogtreecommitdiff
path: root/contrib/aix
diff options
context:
space:
mode:
Diffstat (limited to 'contrib/aix')
-rw-r--r--contrib/aix/README13
-rwxr-xr-xcontrib/aix/buildbff.sh62
-rwxr-xr-xcontrib/aix/inventory.sh4
3 files changed, 64 insertions, 15 deletions
diff --git a/contrib/aix/README b/contrib/aix/README
index 033fd0a5d..82fd8be1b 100644
--- a/contrib/aix/README
+++ b/contrib/aix/README
@@ -6,9 +6,15 @@ installable) openssh package.
6 6
7Directions: 7Directions:
8 8
9(optional) create config.local in your build dir
9./configure [options] 10./configure [options]
10cd contrib/aix; ./buildbff.sh 11contrib/aix/buildbff.sh
11 12
13The file config.local or the environment is read to set the following options
14(default first):
15PERMIT_ROOT_LOGIN=[no|yes]
16X11_FORWARDING=[no|yes]
17AIX_SRC=[no|yes]
12 18
13Acknowledgements: 19Acknowledgements:
14 20
@@ -19,6 +25,8 @@ Jim Abbey's (GPL'ed) lppbuild-2.1 was used to learn how to build .bff's
19and for comparison with the output from this script, however no code 25and for comparison with the output from this script, however no code
20from lppbuild is included and it is not required for operation. 26from lppbuild is included and it is not required for operation.
21 27
28SRC support based on examples provided by Sandor Sklar and Maarten Kreuger.
29
22 30
23Other notes: 31Other notes:
24 32
@@ -26,8 +34,7 @@ The script treats all packages as USR packages (not ROOT+USR when
26appropriate). It seems to work, though...... 34appropriate). It seems to work, though......
27 35
28If there are any patches to this that have not yet been integrated they 36If there are any patches to this that have not yet been integrated they
29may be found at http://www.zip.com.au/~dtucker/openssh/ or 37may be found at http://www.zip.com.au/~dtucker/openssh/.
30http://home.usf.advantra.com.au/~dtucker/openssh/.
31 38
32 39
33Disclaimer: 40Disclaimer:
diff --git a/contrib/aix/buildbff.sh b/contrib/aix/buildbff.sh
index 5c09c6b75..3b3699660 100755
--- a/contrib/aix/buildbff.sh
+++ b/contrib/aix/buildbff.sh
@@ -11,10 +11,12 @@
11 11
12# 12#
13# Tunable configuration settings 13# Tunable configuration settings
14# create a "config.local" in your build directory to override these. 14# create a "config.local" in your build directory or set
15# environment variables to override these.
15# 16#
16PERMIT_ROOT_LOGIN=no 17[ -z "$PERMIT_ROOT_LOGIN" ] || PERMIT_ROOT_LOGIN=no
17X11_FORWARDING=no 18[ -z "$X11_FORWARDING" ] || X11_FORWARDING=no
19[ -z "$AIX_SRC" ] || AIX_SRC=no
18 20
19umask 022 21umask 022
20 22
@@ -167,6 +169,18 @@ For the full text of the license, see /usr/lpp/openssh/LICENCE
167EOD 169EOD
168 170
169# 171#
172# openssh.size file allows filesystem expansion as required
173# generate list of directories containing files
174# then calculate disk usage for each directory and store in openssh.size
175#
176files=`find . -type f -print`
177dirs=`for file in $files; do dirname $file; done | sort -u`
178for dir in $dirs
179do
180 du $dir
181done > ../openssh.size
182
183#
170# Create postinstall script 184# Create postinstall script
171# 185#
172cat <<EOF >>../openssh.post_i 186cat <<EOF >>../openssh.post_i
@@ -245,14 +259,42 @@ else
245fi 259fi
246echo 260echo
247 261
248# Add to system startup if required 262# Set startup command depending on SRC support
249if grep $sbindir/sshd /etc/rc.tcpip >/dev/null 263if [ "$AIX_SRC" = "yes" ]
264then
265 echo Creating SRC sshd subsystem.
266 rmssys -s sshd 2>&1 >/dev/null
267 mkssys -s sshd -p "$sbindir/sshd" -a '-D' -u 0 -S -n 15 -f 9 -R -G tcpip
268 startupcmd="start $sbindir/sshd \\\"\\\$src_running\\\""
269 oldstartcmd="$sbindir/sshd"
270else
271 startupcmd="$sbindir/sshd"
272 oldstartcmd="start $sbindir/sshd \\\"$src_running\\\""
273fi
274
275# If migrating to or from SRC, change previous startup command
276# otherwise add to rc.tcpip
277if egrep "^\$oldstartcmd" /etc/rc.tcpip >/dev/null
250then 278then
251 echo "sshd found in rc.tcpip, not adding." 279 if sed "s|^\$oldstartcmd|\$startupcmd|g" /etc/rc.tcpip >/etc/rc.tcpip.new
280 then
281 chmod 0755 /etc/rc.tcpip.new
282 mv /etc/rc.tcpip /etc/rc.tcpip.old && \
283 mv /etc/rc.tcpip.new /etc/rc.tcpip
284 else
285 echo "Updating /etc/rc.tcpip failed, please check."
286 fi
252else 287else
253 echo >>/etc/rc.tcpip 288 # Add to system startup if required
254 echo "echo Starting sshd" >>/etc/rc.tcpip 289 if grep "^\$startupcmd" /etc/rc.tcpip >/dev/null
255 echo "$sbindir/sshd" >>/etc/rc.tcpip 290 then
291 echo "sshd found in rc.tcpip, not adding."
292 else
293 echo "Adding sshd to rc.tcpip"
294 echo >>/etc/rc.tcpip
295 echo "# Start sshd" >>/etc/rc.tcpip
296 echo "\$startupcmd" >>/etc/rc.tcpip
297 fi
256fi 298fi
257EOF 299EOF
258 300
@@ -262,7 +304,7 @@ EOF
262echo Creating liblpp.a 304echo Creating liblpp.a
263( 305(
264 cd .. 306 cd ..
265 for i in openssh.al openssh.copyright openssh.inventory openssh.post_i LICENCE README* 307 for i in openssh.al openssh.copyright openssh.inventory openssh.post_i openssh.size LICENCE README*
266 do 308 do
267 ar -r liblpp.a $i 309 ar -r liblpp.a $i
268 rm $i 310 rm $i
diff --git a/contrib/aix/inventory.sh b/contrib/aix/inventory.sh
index 78df0d16e..619493ae2 100755
--- a/contrib/aix/inventory.sh
+++ b/contrib/aix/inventory.sh
@@ -2,9 +2,9 @@
2# 2#
3# inventory.sh 3# inventory.sh
4# 4#
5# Originall written by Ben Lindstrom, modified by Darren Tucker to use perl 5# Originally written by Ben Lindstrom, modified by Darren Tucker to use perl
6# 6#
7# This will produced and AIX package inventory file, which looks like: 7# This will produce an AIX package inventory file, which looks like:
8# 8#
9# /usr/local/bin: 9# /usr/local/bin:
10# class=apply,inventory,openssh 10# class=apply,inventory,openssh