Compare commits
2 commits
3a8d9239b2
...
c21f175217
Author | SHA1 | Date | |
---|---|---|---|
c21f175217 | |||
7953f9f3a7 |
2 changed files with 26 additions and 3 deletions
2
Makefile
2
Makefile
|
@ -24,7 +24,7 @@ test:
|
||||||
install:
|
install:
|
||||||
install \
|
install \
|
||||||
-m 755 \
|
-m 755 \
|
||||||
bin/code-preloader \
|
bin/mfm \
|
||||||
$(PREFIX)/bin
|
$(PREFIX)/bin
|
||||||
|
|
||||||
.PHONY: spec test build all prepare install
|
.PHONY: spec test build all prepare install
|
||||||
|
|
|
@ -94,14 +94,37 @@ module GX
|
||||||
exit(1)
|
exit(1)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
## PASS 1
|
||||||
file_data = File.read(config_path)
|
file_data = File.read(config_path)
|
||||||
file_patched = Crinja.render(file_data, {"env" => ENV.to_h})
|
file_patched = Crinja.render(
|
||||||
|
file_data,
|
||||||
|
{
|
||||||
|
"env" => ENV.to_h,
|
||||||
|
"mfm" => {
|
||||||
|
"global" => {"mount_point_base" => "" }
|
||||||
|
}
|
||||||
|
}
|
||||||
|
)
|
||||||
root = Models::RootConfig.from_yaml(file_patched)
|
root = Models::RootConfig.from_yaml(file_patched)
|
||||||
|
|
||||||
mount_point_base_safe = root.global.mount_point_base
|
mount_point_base_safe = root.global.mount_point_base
|
||||||
raise Models::InvalidMountpointError.new("Invalid global mount point") if mount_point_base_safe.nil?
|
raise Models::InvalidMountpointError.new("Invalid global mount point") if mount_point_base_safe.nil?
|
||||||
|
|
||||||
|
## PASS 2
|
||||||
|
file_patched = Crinja.render(
|
||||||
|
file_data,
|
||||||
|
{
|
||||||
|
"env" => ENV.to_h,
|
||||||
|
"mfm" => {
|
||||||
|
"global" => {"mount_point_base" => mount_point_base_safe }
|
||||||
|
}
|
||||||
|
}
|
||||||
|
)
|
||||||
|
|
||||||
|
root = Models::RootConfig.from_yaml(file_patched)
|
||||||
|
mount_point_base_safe = root.global.mount_point_base
|
||||||
|
raise Models::InvalidMountpointError.new("Invalid global mount point") if mount_point_base_safe.nil?
|
||||||
|
|
||||||
root.filesystems.each do |selected_filesystem|
|
root.filesystems.each do |selected_filesystem|
|
||||||
if !selected_filesystem.mount_point?
|
if !selected_filesystem.mount_point?
|
||||||
selected_filesystem.mount_point =
|
selected_filesystem.mount_point =
|
||||||
|
|
Loading…
Add table
Reference in a new issue