home *** CD-ROM | disk | FTP | other *** search
/ Liren Large Software Subsidy 15 / 15.iso / s / s053 / 11.ddi / usr / sadm / sysadm / bin / isoam.ins < prev    next >
Encoding:
Text File  |  1990-12-08  |  1.1 KB  |  56 lines

  1. #!/sbin/sh
  2. #    Copyright (c) 1990 UNIX System Laboratories, Inc.
  3. #    Copyright (c) 1984, 1986, 1987, 1988, 1989, 1990 AT&T
  4. #      All Rights Reserved
  5.  
  6. #    THIS IS UNPUBLISHED PROPRIETARY SOURCE CODE OF
  7. #    UNIX System Laboratories, Inc.
  8. #    The copyright notice above does not evidence any
  9. #    actual or intended publication of such source code.
  10.  
  11.  
  12. #ident    "@(#)/usr/sadm/sysadm/bin/isoam.ins.sl 1.1 4.0 12/08/90 4352 AT&T-USL"
  13.  
  14. # Determine if a package is an installable OAM style package; RC=0 means yes
  15.  
  16. #
  17. # Test for spooled type
  18. #
  19. if [ -d "${1}" ]
  20. then
  21.     echo true
  22.     exit 0
  23. fi
  24.  
  25. DEVICE=`devattr ${1} bdevice 2>/dev/null`
  26. if [ -z "${DEVICE}" ]
  27. then
  28.     echo "invalid"
  29.     exit 1
  30. fi
  31.  
  32. #
  33. # Test for datastreaming type 4.0 package
  34. #
  35. seq=`dd if=${DEVICE} bs=512 count=1 2>/dev/null`
  36. if [ "20" = `expr "${seq}" : "# PaCkAgE DaTaStReAm"` ]
  37. then
  38.     echo true
  39.     exit 0
  40. fi
  41.  
  42. #
  43. # Test for mountable type 4.0 package
  44. #
  45. /sbin/mount ${DEVICE} /install -r > /dev/null 2>&1
  46. if [ -f `echo /install/*/pkginfo | cut -f1 -d' '` ]
  47. then
  48.     /sbin/umount /install > /dev/null 2>&1
  49.     echo true
  50.     exit 0
  51. fi
  52. /sbin/umount /install > /dev/null 2>&1
  53.  
  54. echo false
  55. exit 0
  56.