summaryrefslogtreecommitdiff
path: root/tools/ds-identify
diff options
context:
space:
mode:
Diffstat (limited to 'tools/ds-identify')
-rwxr-xr-xtools/ds-identify8
1 files changed, 7 insertions, 1 deletions
diff --git a/tools/ds-identify b/tools/ds-identify
index c2f710e9..30d4b0f6 100755
--- a/tools/ds-identify
+++ b/tools/ds-identify
@@ -123,7 +123,7 @@ DS_MAYBE=2
DI_DSNAME=""
# this has to match the builtin list in cloud-init, it is what will
# be searched if there is no setting found in config.
-DI_DSLIST_DEFAULT="MAAS ConfigDrive NoCloud AltCloud Azure Bigstep \
+DI_DSLIST_DEFAULT="MAAS ConfigDrive NoCloud LXD AltCloud Azure Bigstep \
CloudSigma CloudStack DigitalOcean Vultr AliYun Ec2 GCE OpenNebula OpenStack \
OVF SmartOS Scaleway Hetzner IBMCloud Oracle Exoscale RbxCloud UpCloud VMware"
DI_DSLIST=""
@@ -802,6 +802,12 @@ dscheck_MAAS() {
return ${DS_NOT_FOUND}
}
+# LXD datasource requires active /dev/lxd/sock
+# https://linuxcontainers.org/lxd/docs/master/dev-lxd
+dscheck_LXD() {
+ [ -S /dev/lxd/sock ] && return ${DS_FOUND} || return ${DS_NOT_FOUND}
+}
+
dscheck_NoCloud() {
local fslabel="cidata CIDATA" d=""
case " ${DI_KERNEL_CMDLINE} " in