Created
February 7, 2014 07:39
-
-
Save toritori0318/8858671 to your computer and use it in GitHub Desktop.
userdataでmount
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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