summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBen Howard <ben.howard@ubuntu.com>2014-11-06 16:33:42 -0700
committerusd-importer <ubuntu-server@lists.ubuntu.com>2014-11-07 00:08:29 +0000
commit7c19244725bac484f17669de0ccfd2dac4bf272d (patch)
tree81fd09788a7a57ba705a298dd562ef1499260588
parent229205d15160a8de34b7afdbf5cbbb49fdc1c061 (diff)
downloadvyos-walinuxagent-7c19244725bac484f17669de0ccfd2dac4bf272d.tar.gz
vyos-walinuxagent-7c19244725bac484f17669de0ccfd2dac4bf272d.zip
Import patches-unapplied version 2.0.8-0ubuntu2 to ubuntu/vivid-proposed
Imported using git-ubuntu import. Changelog parent: 229205d15160a8de34b7afdbf5cbbb49fdc1c061 New changelog entries: * Add upstart job to add "readme" on Azure ephemeral disk (LP: #1382257).
-rw-r--r--debian/changelog6
-rw-r--r--debian/ephemeral-disk-warning.conf37
-rw-r--r--debian/install1
3 files changed, 44 insertions, 0 deletions
diff --git a/debian/changelog b/debian/changelog
index 7aff48f..7654706 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,9 @@
+walinuxagent (2.0.8-0ubuntu2) vivid; urgency=medium
+
+ * Add upstart job to add "readme" on Azure ephemeral disk (LP: #1382257).
+
+ -- Ben Howard <ben.howard@ubuntu.com> Thu, 06 Nov 2014 16:33:42 -0700
+
walinuxagent (2.0.8-0ubuntu1) utopic; urgency=medium
* New upstream release (LP: #1356479).
diff --git a/debian/ephemeral-disk-warning.conf b/debian/ephemeral-disk-warning.conf
new file mode 100644
index 0000000..2081381
--- /dev/null
+++ b/debian/ephemeral-disk-warning.conf
@@ -0,0 +1,37 @@
+# ephemeral-disk-warning - warns user that the disk is really, really ephemeral
+#
+# On Azure, the ephemeral disk is extremely ephemeral; the ephemeral disk is
+# unsafe between boots. This places a file on /mnt that warns the user
+# that the disk is a dangerous place for storing data of any importance.
+
+start on (mounted MOUNTPOINT=/mnt and started cloud-final)
+task
+script
+ dev_sdb_mp=$(mount | awk '/sdb1/{print$3}')
+ warn_file="$dev_sdb_mp/DATALOSS_WARNING_README.txt"
+ if [ -z "$dev_sdb_mp" ]; then
+ logger "Unable to discover /dev/sdb1's mount point, ephemeral warning will not be written"
+ exit 0
+ else
+ logger "Ephemeral disk /dev/sdb located at $dev_sdb_mp"
+ fi
+
+ if [ ! -e "$warn_file" ]; then
+ cat >> $warn_file <<"EOF"
+WARNING: THIS IS A TEMPORARY DISK.
+
+Any data stored on this drive is SUBJECT TO LOSS and THERE IS NO WAY TO
+RECOVER IT.
+
+Please do not use this disk for storing any personal or application data.
+
+For additional details to please refer to the MSDN documentation at:
+http://msdn.microsoft.com/en-us/library/windowsazure/jj672979.aspx
+EOF
+ chmod 0444 $warn_file
+ chattr +i $warn_file
+ logger "Added ephemeral disk warning to $warn_file"
+ fi
+ logger "WARNING: $dev_sdb_mp is an ephemeral disk. See $warn_file for more information"
+
+end script
diff --git a/debian/install b/debian/install
index f315729..3f1da87 100644
--- a/debian/install
+++ b/debian/install
@@ -1 +1,2 @@
config/91_walinuxagent.cfg etc/cloud/cloud.cfg.d
+debian/ephemeral-disk-warning.conf etc/init