home *** CD-ROM | disk | FTP | other *** search
/ Chip 2004 April / Chip_2004-04_cd1.bin / opsys / macos / isync / isync.dmg / iSync.pkg / Contents / Resources / postflight-cleanup < prev    next >
Text File  |  2003-07-03  |  1KB  |  58 lines

  1. #!/bin/sh
  2.  
  3. #echo "entering postflight shell script"
  4.  
  5. #
  6. # Create the Application support folder for iSync so anybody can write into it.
  7. #
  8. APPSUPPORT="$3/Library/Application Support/"
  9. SYNCSERVICES="SyncService"
  10.  
  11. # if the directory doesn't exist, create it
  12. if [ ! -d "$APPSUPPORT/$SYNCSERVICES" ]; then
  13.     umask 022
  14.     /bin/mkdir -p -m 1777 "$APPSUPPORT/$SYNCSERVICES"
  15. fi
  16.  
  17. # ensure that the owner and permissions on the directory are fine
  18. /usr/sbin/chown root:admin "$APPSUPPORT"
  19. /usr/sbin/chown root:admin "$APPSUPPORT/$SYNCSERVICES"
  20. /bin/chmod 1777 "$APPSUPPORT/$SYNCSERVICES"
  21.  
  22. #
  23. # The Symbian conduit needs a specific ppp configuration setup to work
  24. #
  25. ETC_PPP_DIR="$3/etc/ppp"
  26. ETC_PPP_PEERS="${ETC_PPP_DIR}/peers"
  27.  
  28. PPP_OPTION_FILE="${ETC_PPP_DIR}/options"
  29. PPP_MROUTER_FILE="${ETC_PPP_PEERS}/mrouter"
  30.  
  31. if [ ! -d ${ETC_PPP_DIR} ]; then
  32.     /bin/mkdir ${ETC_PPP_DIR}
  33.     /usr/sbin/chown root.admin ${ETC_PPP_DIR}
  34.     /bin/chmod 755 ${ETC_PPP_DIR}
  35. fi
  36.  
  37. if [ ! -d ${ETC_PPP_PEERS} ]; then
  38.     /bin/mkdir ${ETC_PPP_PEERS}
  39.     /usr/sbin/chown root.admin ${ETC_PPP_PEERS}
  40.     /bin/chmod 755 ${ETC_PPP_PEERS}
  41. fi
  42.  
  43. if [ ! -f ${PPP_OPTION_FILE} ]; then
  44.     /usr/bin/touch ${PPP_OPTION_FILE}
  45.     /usr/sbin/chown root.admin ${PPP_OPTION_FILE}
  46.     /bin/chmod 644 ${PPP_OPTION_FILE}
  47. fi
  48.  
  49. echo "noauth" > ${PPP_MROUTER_FILE}
  50. echo "/dev/tty.mRouter" >>  ${PPP_MROUTER_FILE}
  51. /usr/sbin/chown root.admin ${PPP_MROUTER_FILE}
  52. /bin/chmod 644 ${PPP_MROUTER_FILE}
  53.  
  54. #echo "exiting postflight shell script..."
  55. #echo
  56.  
  57. exit 0
  58.