#!/usr/bin/env ruby
#
# dcast $Revision: 1.2 $
#
# Copyright (C) 2006, Masahiro Nakao <mnakao@pre-dawn.net>
# You can redistribute it and/or modify it under GPL2 or more.

require "libexec/path_class"
require "libexec/backup"
require 'fileutils'

path = Path.new

FileUtils.rm_r(path.tftpboot, :verbose=>true) if FileTest.exist?(path.tftpboot)

Array files=[path.dhcp, path.dhcp_i, path.pxe, path.mpich]
files.push("/etc/hosts")
files.push("/etc/hosts.equiv")
files.push("/etc/exports")
files.push("/root/.rhosts")
setting_files_reverse(path.backup, files)
FileUtils.rm_r(path.backup, :verbose=>true) if FileTest.exist?(path.backup)

exit 0
