diff options
Diffstat (limited to 'debian')
-rw-r--r-- | debian/68-azure-nm-unmanaged.rules | 4 | ||||
-rw-r--r-- | debian/changelog | 9 | ||||
-rw-r--r-- | debian/control | 1 | ||||
-rw-r--r-- | debian/ephemeral-disk-warning.conf | 27 | ||||
-rwxr-xr-x | debian/ephemeral-disk-warning.sh | 6 | ||||
-rw-r--r-- | debian/install | 1 |
6 files changed, 39 insertions, 9 deletions
diff --git a/debian/68-azure-nm-unmanaged.rules b/debian/68-azure-nm-unmanaged.rules new file mode 100644 index 0000000..ce38183 --- /dev/null +++ b/debian/68-azure-nm-unmanaged.rules @@ -0,0 +1,4 @@ +# When WALinuxAgent is installed, then don't allow for network-manager +# to manage the interface. +# +ENV{INTERFACE}=="eth[0-9]*", ENV{ID_NET_DRIVER}=="hv_netvsc", ENV{NM_UNMANAGED}="1" diff --git a/debian/changelog b/debian/changelog index 4107d02..ccf5886 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,12 @@ +walinuxagent (2.1.3-0ubuntu3) xenial; urgency=medium + + * Remove conflict with NetworkManager (LP: #1550461): + - devices on the hyperv bus are ignored via new udev rule. + * Made the upstart job more consistant with systemd service to use the + /dev/disk/azure/resource-part1 path instead of /dev/sdb (LP: #1544764) + + -- Ben Howard <ben.howard@ubuntu.com> Fri, 26 Feb 2016 11:06:35 -0700 + walinuxagent (2.1.3-0ubuntu2) xenial; urgency=medium * Fixed file shebangs to use python3. diff --git a/debian/control b/debian/control index 3e561e0..f8a00bb 100644 --- a/debian/control +++ b/debian/control @@ -23,7 +23,6 @@ Depends: cloud-init (>=0.7.3~bzr826-0ubuntu2), ${misc:Depends}, ${python:Depends} Recommends: linux-image-extra-virtual -Conflicts: network-manager Description: Windows Azure Linux Agent The Windows Azure Linux Agent supports the provisioning and running of Linux VMs in the Windows Azure cloud. This package should be installed on Linux diff --git a/debian/ephemeral-disk-warning.conf b/debian/ephemeral-disk-warning.conf index 714ee99..39d54d1 100644 --- a/debian/ephemeral-disk-warning.conf +++ b/debian/ephemeral-disk-warning.conf @@ -4,20 +4,29 @@ # 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. +env RESOURCE_DISK=/dev/disk/azure/resource-part1 + start on (stopped rc RUNLEVEL=[2345] and stopped cloud-config) 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" + if [ ! -e $RESOURCE_DISK ]; then + logger "Disk $RESOURCE_DISK does not exist, skipping ephemeral warning" + exit 0 + fi + + ephemeral_kdev=$(readlink -f $RESOURCE_DISK) + ephemeral_mp=$(awk '$1==kd {print$2}' "kd=$ephemeral_kdev" /proc/mounts) + warn_file="$ephemeral_mp/DATALOSS_WARNING_README.txt" + + if [ -z "$ephemeral_mp" ]; then + logger "Unable to discover mount point of $ephemeral_kdev. Ephemeral warning will not be written" exit 0 else - logger "Ephemeral disk /dev/sdb located at $dev_sdb_mp" + logger "Ephemeral disk $ephemeral_kdev located at $ephemeral_mp" fi if [ ! -e "$warn_file" ]; then - cat >> $warn_file <<"EOF" + 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 @@ -27,11 +36,15 @@ 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 + +To remove this warning run: + sudo chattr -i $warn_file + 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" + logger "WARNING: $ephemeral_mp is an ephemeral disk. See $warn_file for more information" end script diff --git a/debian/ephemeral-disk-warning.sh b/debian/ephemeral-disk-warning.sh index 82b043b..3cc8f86 100755 --- a/debian/ephemeral-disk-warning.sh +++ b/debian/ephemeral-disk-warning.sh @@ -1,6 +1,6 @@ #!/bin/sh dev_resource=$(readlink -f /dev/disk/azure/resource-part1) -dev_resource_mp=$(mount | awk '$1==R {print$3}' "R=${dev_resource}") +dev_resource_mp=$(awk '$1==R {print$2}' "R=${dev_resource}" /proc/mounts) warn_file="${dev_resource_mp}/DATALOSS_WARNING_README.txt" if [ ! -f "${warn_file}" ]; then @@ -14,6 +14,10 @@ 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 + +To remove this warning run: + sudo chattr -i $warn_file + EOM chmod 0444 ${warn_file} diff --git a/debian/install b/debian/install index 8005bb5..5cfd70b 100644 --- a/debian/install +++ b/debian/install @@ -4,4 +4,5 @@ debian/ephemeral-disk-warning.conf etc/init debian/ephemeral-disk-warning.sh usr/sbin debian/66-azure-storage.rules lib/udev/rules.d debian/67-azure-console.rules lib/udev/rules.d +debian/68-azure-nm-unmanaged.rules lib/udev/rules.d debian/azure-resource usr/share/initramfs-tools/hooks |