diff options
Diffstat (limited to 'tiny-ec2-bootstrap')
-rw-r--r-- | tiny-ec2-bootstrap | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/tiny-ec2-bootstrap b/tiny-ec2-bootstrap index c03fcd3..83aeba7 100644 --- a/tiny-ec2-bootstrap +++ b/tiny-ec2-bootstrap | |||
@@ -64,13 +64,17 @@ start() { | |||
64 | # Don't bootstrap if the host has already been bootstrapped | 64 | # Don't bootstrap if the host has already been bootstrapped |
65 | [ -f "/var/lib/cloud/.bootstrap-complete" ] && return 0 | 65 | [ -f "/var/lib/cloud/.bootstrap-complete" ] && return 0 |
66 | 66 | ||
67 | # load configuration, set defaults | ||
68 | [ -f "/etc/conf.d/tiny-ec2-bootstrap" ] && . /etc/conf.d/tiny-ec2-bootstrap | ||
69 | EC2_USER=${EC2_USER:-alpine} | ||
70 | |||
67 | [ -d "/var/lib/cloud" ] || mkdir -p /var/lib/cloud | 71 | [ -d "/var/lib/cloud" ] || mkdir -p /var/lib/cloud |
68 | 72 | ||
69 | ebegin "Disabling root password"; _disable_password root; eend $? | 73 | ebegin "Disabling root password"; _disable_password root; eend $? |
70 | ebegin "Disabling alpine password"; _disable_password alpine; eend $? | 74 | ebegin "Disabling $EC2_USER password"; _disable_password "$EC2_USER"; eend $? |
71 | ebegin "Resizing root partition"; _resize_root_partition; eend $? | 75 | ebegin "Resizing root partition"; _resize_root_partition; eend $? |
72 | ebegin "Setting ec2 hostname"; _update_hostname; eend $? | 76 | ebegin "Setting ec2 hostname"; _update_hostname; eend $? |
73 | ebegin "Setting ec2 user ssh keys"; _set_ssh_keys "alpine"; eend $? | 77 | ebegin "Setting ec2 user ssh keys"; _set_ssh_keys "$EC2_USER"; eend $? |
74 | ebegin "Running ec2 user data script"; _run_userdata; eend $? | 78 | ebegin "Running ec2 user data script"; _run_userdata; eend $? |
75 | 79 | ||
76 | touch "/var/lib/cloud/.bootstrap-complete" | 80 | touch "/var/lib/cloud/.bootstrap-complete" |