Sha256: ad3eebe29b6c016c11dd6b192d8c81df5de8537a443c543008f8032b1f5cb7d7
Contents?: true
Size: 689 Bytes
Versions: 3
Compression:
Stored size: 689 Bytes
Contents
# Copyright (c) 2014 Tnarik Innael - adaptation to Solaris and repackaging # Copyright (c) 2014 Mitchell Hashimoto - from plugins/guest/linux/cap/remove_public_key.rb module Vagrant module Solaris10 module Cap class RemovePublicKey def self.remove_public_key(machine, contents) contents = contents.chomp contents = Vagrant::Util::ShellQuote.escape(contents, "'") machine.communicate.tap do |comm| if comm.test("test -f ~/.ssh/authorized_keys") comm.execute( "gsed -i '/^.*#{contents}.*$/d' ~/.ssh/authorized_keys") end end end end end end end
Version data entries
3 entries across 3 versions & 1 rubygems