diff options
Diffstat (limited to 'contrib/aix')
-rw-r--r-- | contrib/aix/README | 13 | ||||
-rwxr-xr-x | contrib/aix/buildbff.sh | 62 | ||||
-rwxr-xr-x | contrib/aix/inventory.sh | 4 |
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 | ||
7 | Directions: | 7 | Directions: |
8 | 8 | ||
9 | (optional) create config.local in your build dir | ||
9 | ./configure [options] | 10 | ./configure [options] |
10 | cd contrib/aix; ./buildbff.sh | 11 | contrib/aix/buildbff.sh |
11 | 12 | ||
13 | The file config.local or the environment is read to set the following options | ||
14 | (default first): | ||
15 | PERMIT_ROOT_LOGIN=[no|yes] | ||
16 | X11_FORWARDING=[no|yes] | ||
17 | AIX_SRC=[no|yes] | ||
12 | 18 | ||
13 | Acknowledgements: | 19 | Acknowledgements: |
14 | 20 | ||
@@ -19,6 +25,8 @@ Jim Abbey's (GPL'ed) lppbuild-2.1 was used to learn how to build .bff's | |||
19 | and for comparison with the output from this script, however no code | 25 | and for comparison with the output from this script, however no code |
20 | from lppbuild is included and it is not required for operation. | 26 | from lppbuild is included and it is not required for operation. |
21 | 27 | ||
28 | SRC support based on examples provided by Sandor Sklar and Maarten Kreuger. | ||
29 | |||
22 | 30 | ||
23 | Other notes: | 31 | Other notes: |
24 | 32 | ||
@@ -26,8 +34,7 @@ The script treats all packages as USR packages (not ROOT+USR when | |||
26 | appropriate). It seems to work, though...... | 34 | appropriate). It seems to work, though...... |
27 | 35 | ||
28 | If there are any patches to this that have not yet been integrated they | 36 | If there are any patches to this that have not yet been integrated they |
29 | may be found at http://www.zip.com.au/~dtucker/openssh/ or | 37 | may be found at http://www.zip.com.au/~dtucker/openssh/. |
30 | http://home.usf.advantra.com.au/~dtucker/openssh/. | ||
31 | 38 | ||
32 | 39 | ||
33 | Disclaimer: | 40 | Disclaimer: |
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 | # |
16 | PERMIT_ROOT_LOGIN=no | 17 | [ -z "$PERMIT_ROOT_LOGIN" ] || PERMIT_ROOT_LOGIN=no |
17 | X11_FORWARDING=no | 18 | [ -z "$X11_FORWARDING" ] || X11_FORWARDING=no |
19 | [ -z "$AIX_SRC" ] || AIX_SRC=no | ||
18 | 20 | ||
19 | umask 022 | 21 | umask 022 |
20 | 22 | ||
@@ -167,6 +169,18 @@ For the full text of the license, see /usr/lpp/openssh/LICENCE | |||
167 | EOD | 169 | EOD |
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 | # | ||
176 | files=`find . -type f -print` | ||
177 | dirs=`for file in $files; do dirname $file; done | sort -u` | ||
178 | for dir in $dirs | ||
179 | do | ||
180 | du $dir | ||
181 | done > ../openssh.size | ||
182 | |||
183 | # | ||
170 | # Create postinstall script | 184 | # Create postinstall script |
171 | # | 185 | # |
172 | cat <<EOF >>../openssh.post_i | 186 | cat <<EOF >>../openssh.post_i |
@@ -245,14 +259,42 @@ else | |||
245 | fi | 259 | fi |
246 | echo | 260 | echo |
247 | 261 | ||
248 | # Add to system startup if required | 262 | # Set startup command depending on SRC support |
249 | if grep $sbindir/sshd /etc/rc.tcpip >/dev/null | 263 | if [ "$AIX_SRC" = "yes" ] |
264 | then | ||
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" | ||
270 | else | ||
271 | startupcmd="$sbindir/sshd" | ||
272 | oldstartcmd="start $sbindir/sshd \\\"$src_running\\\"" | ||
273 | fi | ||
274 | |||
275 | # If migrating to or from SRC, change previous startup command | ||
276 | # otherwise add to rc.tcpip | ||
277 | if egrep "^\$oldstartcmd" /etc/rc.tcpip >/dev/null | ||
250 | then | 278 | then |
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 | ||
252 | else | 287 | else |
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 | ||
256 | fi | 298 | fi |
257 | EOF | 299 | EOF |
258 | 300 | ||
@@ -262,7 +304,7 @@ EOF | |||
262 | echo Creating liblpp.a | 304 | echo 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 |