Advertisement
Guest User

Untitled

a guest
Jun 11th, 2010
381
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 0.83 KB | None | 0 0
  1. #!/bin/sh
  2.  
  3. set -ex
  4. case "$1" in
  5.     configure)
  6.         . /usr/share/debconf/confmodule
  7.         db_input high s3fs/set_secret_key || true
  8.         db_go
  9.         db_get s3fs/set_secret_key
  10.         if [ "$RET" = "true" ]; then
  11.             db_input high s3fs/access_key || true
  12.             db_go
  13.             db_get s3fs/access_key
  14.             accesskey=$RET
  15.             db_input high s3fs/secret_key || true
  16.             db_go
  17.             db_get s3fs/secret_key
  18.             secretkey=$RET
  19.         else
  20.             db_unregister s3fs/set_secret_key
  21.         fi
  22.         echo "$accesskey:$secretkey" > /etc/passwd-s3fs
  23.         chmod 400 /etc/passwd-s3fs
  24.     ;;
  25.  
  26.     abort-upgrade|abort-remove|abort-deconfigure)
  27.     ;;
  28.  
  29.     *)
  30.         echo "postinst called with unknown argument \`$1'" >&2
  31.         exit 1
  32.     ;;
  33. esac
  34.  
  35.  
  36.  
  37. exit 0
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement