mirror of
https://github.com/bobbimanners/emailler.git
synced 2024-12-27 04:29:29 +00:00
git-svn-id: http://svn.code.sf.net/p/netboot65/code@8 93682198-c243-4bdb-bd91-e943c89aac3b
This commit is contained in:
parent
2c6e52b366
commit
6b7515df66
28
server/netboot65_server.rb
Normal file
28
server/netboot65_server.rb
Normal file
@ -0,0 +1,28 @@
|
||||
#
|
||||
# netboot65 server
|
||||
#
|
||||
# Jonno Downes (jonno@jamtronix.com) - January, 2009
|
||||
#
|
||||
#
|
||||
|
||||
def log_msg(msg)
|
||||
puts "#{Time.now} #{msg}"
|
||||
end
|
||||
|
||||
$:.unshift(File.dirname(__FILE__)) unless
|
||||
$:.include?(File.dirname(__FILE__)) || $:.include?(File.expand_path(File.dirname(__FILE__)))
|
||||
require 'netboot65_tftp'
|
||||
|
||||
bootfile_dir=File.expand_path(File.dirname(__FILE__)+"//..//clients")
|
||||
tftp_server=Netboot65TFTPServer.new(bootfile_dir)
|
||||
|
||||
tftp_server.start
|
||||
begin
|
||||
loop do
|
||||
sleep(1) #wake up every second to get keyboard input, so we break on ^C
|
||||
end
|
||||
rescue Interrupt
|
||||
log_msg "got interrupt signal - shutting down"
|
||||
end
|
||||
tftp_server.shutdown
|
||||
log_msg "shut down complete."
|
Loading…
Reference in New Issue
Block a user