Skip to content

Commit

Permalink
prevent virtio devices from being renamed
Browse files Browse the repository at this point in the history
This fixes #22.
  • Loading branch information
gh2o committed Sep 20, 2015
1 parent 55c4ee9 commit 05c404e
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -284,6 +284,7 @@ package_digitalocean_synchronize() {
local destination=$1
local pkgroot=/d2a/work/dosync
local sysdir=${pkgroot}/usr/lib/systemd/system
local netdir=${pkgroot}/usr/lib/systemd/network

mkdir -p ${pkgroot}
extract_embedded_file digitalocean-synchronize.PKGINFO > ${pkgroot}/.PKGINFO
Expand All @@ -293,6 +294,8 @@ package_digitalocean_synchronize() {
extract_embedded_file digitalocean-synchronize.service > ${sysdir}/digitalocean-synchronize.service
mkdir -p ${sysdir}/multi-user.target.wants
ln -s ../digitalocean-synchronize.service ${sysdir}/multi-user.target.wants
mkdir -p ${netdir}
extract_embedded_file 90-virtio-no-rename.link > ${netdir}/90-virtio-no-rename.link

chmod 0755 ${pkgroot}/usr/bin/digitalocean-synchronize

Expand Down Expand Up @@ -996,11 +999,19 @@ ExecStart=/usr/sbin/digitalocean-synchronize
!!!!digitalocean-synchronize.PKGINFO
pkgname = digitalocean-synchronize
pkgver = 2.4-1
pkgver = 2.4-2
pkgdesc = DigitalOcean Synchronization (passwords, keys, networks)
url = https://github.com/gh2o/digitalocean-debian-to-arch
arch = any
license = GPL
!!!!
!!!!90-virtio-no-rename.link
# Prevent virtio network devices from being renamed.
[Match]
Driver=virtio_net
[Link]
NamePolicy=kernel
!!!!
EMBEDDED

0 comments on commit 05c404e

Please sign in to comment.