Skip to content

Instantly share code, notes, and snippets.

@toritori0318
Created February 7, 2014 07:39
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save toritori0318/8858671 to your computer and use it in GitHub Desktop.
Save toritori0318/8858671 to your computer and use it in GitHub Desktop.
userdataでmount
#!/bin/bash -ex
exec > >(tee /var/log/user-data.log|logger -t user-data -s 2>/dev/console) 2>&1
while [ ! -e /dev/sdb ]; do echo Waiting for Ephemeral Disk to attach; sleep 5; done
if ! `df | grep -q /media/ephemeral0` ; then
mkfs.ext3 /dev/sdb
mount -t ext3 /dev/sdb /media/ephemeral0
fi
# snip...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment