summaryrefslogtreecommitdiff
path: root/contrib/aix/buildbff.sh
diff options
context:
space:
mode:
authorDamien Miller <djm@mindrot.org>2003-03-10 12:10:45 +1100
committerDamien Miller <djm@mindrot.org>2003-03-10 12:10:45 +1100
commitc9c1d3757f76381c432bac4ed6b20cfd90167601 (patch)
tree42e39e179a5b2abd0ca2099c015e41b96ac97c3c /contrib/aix/buildbff.sh
parent933cc8fb9cd3e34b9b656f73ad8b661c08551875 (diff)
- (djm) AIX package builder update from dtucker@zip.com.au
Diffstat (limited to 'contrib/aix/buildbff.sh')
-rwxr-xr-xcontrib/aix/buildbff.sh62
1 files changed, 52 insertions, 10 deletions
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