2008-11-22 22:35:24 +02:00
|
|
|
#####
|
|
|
|
## WrapSix
|
|
|
|
###
|
|
|
|
#> lib/wrapper.rb
|
|
|
|
#~ WrapSix Wrapper
|
|
|
|
####
|
2009-01-15 00:05:12 +02:00
|
|
|
# Author: Michal Zima, 2008-2009
|
2008-11-22 22:35:24 +02:00
|
|
|
# E-mail: xhire@tuxportal.cz
|
|
|
|
#####
|
|
|
|
|
|
|
|
class Wrapper
|
|
|
|
def initializer
|
2009-01-15 00:05:12 +02:00
|
|
|
@debug = $config['debug']
|
2008-11-22 22:35:24 +02:00
|
|
|
end
|
|
|
|
|
|
|
|
def start
|
2009-01-15 00:05:12 +02:00
|
|
|
params = "#{$config['wrapper_ipv4_address']} #{$config['wrapper_ipv6_prefix']}"
|
|
|
|
params += " #{$config['wrapper_device']}" if $config['wrapper_device']
|
|
|
|
unless @debug
|
|
|
|
params += " > /dev/null"
|
|
|
|
end
|
|
|
|
system "wrapper/wrapper #{params}"
|
2008-11-22 22:35:24 +02:00
|
|
|
end
|
|
|
|
|
|
|
|
def exit
|
|
|
|
end
|
|
|
|
end
|