Skip to content

Commit

Permalink
Issue #4: manually running mount commands and validateStoneSysNodes r…
Browse files Browse the repository at this point in the history
…esults in a properly structured tODE directory structure ... major progress
  • Loading branch information
dalehenrich committed Aug 5, 2023
1 parent e69162c commit ecc2dd9
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 16 deletions.
2 changes: 1 addition & 1 deletion bin/validateStoneSysNodes.stone
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ doit
(ServerFileDirectory on: self todeHome, templateNodePath , nodename) exists
ifFalse: [ templateNodePath := '/sys/default/server/templates/' ].
cpTool
cp: templateNodePath , nodename
cp: templateNodePath , filename
to: '/sys/stones/' , self stoneName ]
ifFalse: [
nil
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,20 +2,20 @@ mount command
executeMountCommand: command batchMode: aBool
"only one of --todeRoot of --serverRoot may be present"

| index option commandLine todeRoot serverRoot rest |
| index option commandLine todeRoot stoneRoot rest |
commandLine := command commandLine copy.
todeRoot := '--todeRoot'.
serverRoot := '--serverRoot'.
stoneRoot := '--stoneRoot'.
(index := commandLine findString: todeRoot startingAt: 1) > 0
ifTrue: [ option := todeRoot ]
ifFalse: [
(index := commandLine findString: serverRoot startingAt: 1) > 0
ifTrue: [ option := serverRoot ] ].
(index := commandLine findString: stoneRoot startingAt: 1) > 0
ifTrue: [ option := stoneRoot ] ].
index > 0
ifTrue: [
| newCommandLine commandStream skipDone optionPath |
"--todeRoot and --serverRoot options for mount command use a call back, so hard-wire
todeRoot/serverRoot path into the command and remove --todeRoot/--serverRoot
"--todeRoot and --stoneRoot options for mount command use a call back, so hard-wire
todeRoot/stoneRoot path into the command and remove --todeRoot/--stoneRoot
option from commandLine"
newCommandLine := (commandLine copyFrom: 1 to: index - 1)
, (commandLine copyFrom: index + option size to: commandLine size).
Expand All @@ -29,8 +29,8 @@ executeMountCommand: command batchMode: aBool
ifTrue: [ self sessionDescription serverTodeRoot ]
ifFalse: [
"fabricate the --stoneRoot path for the stone associated with session description"
self sessionDescription serverTodeRoot.
'/' , '/sys/stones/' , self sessionDescription stoneName ].
self sessionDescription serverTodeRoot , '/sys/stones/'
, self sessionDescription stoneName ].
newCommandLine := 'mount ' , optionPath.
commandStream peek = $/
ifFalse: [
Expand Down
5 changes: 2 additions & 3 deletions tode/setUpSys_1
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
# Set up /sys node structure
mount --todeRoot / / _home
mount --todeRoot sys/default /sys default
mount --todeRoot sys/local /sys local
mount --todeRoot sys/local/server/stones /sys stones
# /sys/default/bin/validateStoneSysNodes --files --repair

mount --stoneRoot / /sys stone
commit
4 changes: 0 additions & 4 deletions tode/setUpSys_2
Original file line number Diff line number Diff line change
@@ -1,7 +1,3 @@
# /sys/default/bin/validateStoneSysNodes --files --repair
mount --stoneRoot / /sys stone
# Define /home and /projects based on a composition of the /sys nodes
mount --stoneRoot homeComposition.ston / home
mount --stoneRoot projectComposition.ston / projects
commit
cd

0 comments on commit ecc2dd9

Please sign in to comment.