~j-harbott/cirros/dev

« back to all changes in this revision

Viewing changes to src/etc/rc.d/init.d/cloud-final

  • Committer: Scott Moser
  • Date: 2011-09-21 00:58:21 UTC
  • Revision ID: smoser@ubuntu.com-20110921005821-fxtb4o4xaqktm1dm
add 'src' from old ttylinux-uec (revno 55).

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#!/bin/sh
 
2
# vi: ts=4 noexpandtab
 
3
 
 
4
XN=cloud-final
 
5
. /etc/rc.d/init.d/cloud-functions
 
6
 
 
7
start() {
 
8
        local iid="" iip="" eip="" uptime=""
 
9
        read uptime cputime < /proc/uptime
 
10
        echo "===== ${XN}: system completely up in ${uptime} seconds ===="
 
11
        is_nocloud && return 0
 
12
        mdget instance-id && iid=${_RET}
 
13
        mdget public-ipv4 && eip=${_RET}
 
14
        mdget local-ipv4 && iip=${_RET}
 
15
        cat <<EOF
 
16
  instance-id: ${iid}
 
17
  public-ipv4: ${eip}
 
18
  local-ipv4 : ${iip}
 
19
EOF
 
20
}
 
21
 
 
22
case "$1" in
 
23
        start) start;;
 
24
        *) msg "unknown argument ${1}";;
 
25
esac