end
def self.list_id
- @@log = PackageServerLog.new( "#{SERVER_ROOT}/.log" )
+ lock_file = Utils.file_lock(LOCK_FILE)
+ @@log = PackageServerLog.new("#{SERVER_ROOT}/.log")
d = Dir.new( SERVER_ROOT )
s = d.select {|f| not f.start_with?(".") }
@@log.output( id, Log::LV_USER)
end
+ @@log.close
+ FileUtils.rm_rf("#{SERVER_ROOT}/.log")
+ Utils.file_unlock(lock_file)
end
def self.list_dist( id )
+ lock_file = Utils.file_lock(LOCK_FILE)
@@log = PackageServerLog.new( "#{SERVER_ROOT}/.log" )
@@log.output( "=== ID [#{id}]'s distribution list ===", Log::LV_USER)
end
end
end
+ @@log.close
+ FileUtils.rm_rf("#{SERVER_ROOT}/.log")
+ Utils.file_unlock(lock_file)
end
def get_default_dist_name()