5 # REQUIRE: mountcritlocal
12 desc="Limited Cloud Init configuration"
13 start_cmd="nuageinit_start"
15 rcvar="nuageinit_enable"
20 # detect cloud init provider
21 # according to the specification of the config drive
22 # it either formatted in vfat or iso9660 and labeled
24 for f in iso9660 msdosfs; do
25 drive=/dev/$f/config-2
26 if [ -e $drive ]; then
31 if [ -e $drive ]; then
37 if [ -z "$drive" ]; then
38 # try to detect networked based instance
39 err 1 "Impossible to find a cloud init provider"
41 mkdir -p /media/nuageinit
43 mount -t $fs $drive /media/nuageinit
44 # according to the specification, the content is either
45 # in the openstack or ec2 directory
48 for d in openstack ec2; do
49 dir=/media/nuageinit/$d/latest
51 /usr/libexec/nuageinit $dir $citype
57 /usr/libexec/nuageinit /media/nuageinit $citype
60 if [ -n "$drive" ]; then
61 umount /media/nuageinit
63 rmdir /media/nuageinit