-
Notifications
You must be signed in to change notification settings - Fork 2
Plugin alternatives
Hannes Georg edited this page Mar 9, 2017
·
1 revision
This plugin manages the config of update-alternatives.
# Adds "/opt/myfoo/bin/foo" as provider for "foo" ( short form )
plugin "alternatives",
'foo' => '/opt/myfoo/bin/foo'
# Adds "/opt/myfoo/bin/foo" as provider for "foo" ( long form )
plugin "alternatives",
'foo' => {
path: '/opt/myfoo/bin/foo'
}
Sets the priority of an alternative.
# Adds "/opt/myfoo/bin/foo" as provider for "foo" with priority 9001
plugin "alternatives",
'foo' => {
path: '/opt/myfoo/bin/foo',
priority: 9001
}
Override the linked file. If not given it's assumed that the linked file is /usr/bin/#{name}
( e.g. /usr/bin/foo
for foo
).
# Adds "/opt/myjvm/lib/libjvm.so" as provider for "libjvm.so"
plugin "alternatives",
'libjvm.so' => {
link: '/usr/lib/libjvm.so',
path: '/opt/myjvm/lib/libjvm.so'
}
Adds more alternatives as slaves.
# Adds "/opt/myfoo/bin/foo" as provider for "foo" and "/opt/myfoo/bin/footool" as provider for "footool".
# "footool" is then a slave alternative of "foo".
plugin "alternatives",
'foo' => {
path: '/opt/myfoo/bin/foo',
slaves: {
'footool' => '/opt/myfoo/bin/footool'
}
}