boot/init: Add System.symlink
Same as File.symlink, but logged.
(Also fixes logging of System.write)
@@ -84,10 +84,15 @@ module System
end
def self.write(file, contents)
- $logger.debug("echo #{contents.to_json} > #{file}")
+ $logger.debug(" $ echo #{contents.to_json} > #{file}")
File.write(file, contents)
end
+ def self.symlink(source, destination)
+ $logger.debug(" $ ln -s #{source} #{destination}")
+ File.symlink(source, destination)
+ end
+
# Lists all mount points.
# This handles temporarily mounting /proc if required.
# This will hide /proc in those instances.
