Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
vbox-scripts
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Alberto LIVIO BECCARIA
vbox-scripts
Commits
05f25a59
Commit
05f25a59
authored
8 years ago
by
ulisse
Browse files
Options
Downloads
Patches
Plain Diff
vm-setup now generates a valid MAC address
vm-start: fixed fullscreen variable check
parent
11474a82
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
vm-setup
+1
-0
1 addition, 0 deletions
vm-setup
vm-start
+2
-3
2 additions, 3 deletions
vm-start
with
3 additions
and
3 deletions
vm-setup
+
1
−
0
View file @
05f25a59
...
...
@@ -66,6 +66,7 @@ sed -i 's@\(Machine.*name="\)\([^"]*\)\("\)@\1'"`echo "${VM_NAME}"`"'\3@g' "${VM
sed
-i
's@\(Machine.*snapshotFolder="\)\([^"]*\)\("\)@\1'
"
`
echo
"
${
TMP_DIR
}
"
`
"
'\3@g'
"
${
VM_DIR
}
/
${
VM_NAME
}
.vbox"
sed
-i
's@\(SharedFolder.*name="'
"
`
echo
"
${
SF_LINUX_NAME
}
"
`
"
'".*hostPath="\)\([^"]*\)\("\)@\1'
"
`
echo
"
${
SF_LINUX_TARGET
}
"
`
"
'\3@g'
"
${
VM_DIR
}
/
${
VM_NAME
}
.vbox"
sed
-i
's@\(SharedFolder.*name="'
"
`
echo
"
${
SF_MEDIA_NAME
}
"
`
"
'".*hostPath="\)\([^"]*\)\("\)@\1'
"
`
echo
"
${
SF_MEDIA_TARGET
}
"
`
"
'\3@g'
"
${
VM_DIR
}
/
${
VM_NAME
}
.vbox"
sed
-i
's@\(MACAddress="\)\([^"]*\)\("\)@\1'
"
`
printf
'080027%02X%02X%02X'
$[
RANDOM%256]
$[
RANDOM%256]
$[
RANDOM%256]
`
"
'\3@g'
"
${
VM_DIR
}
/
${
VM_NAME
}
.vbox"
if
[
"
${
DIFF_DISK_FILE
}
"
!=
""
]
;
then
sed
-i
's@\(HardDisk.*location="\)\([^"]*diff_[^"]*\)\("\)@\1'
"
`
echo
"
${
TMP_DIR
}
/
${
DIFF_DISK_FILE
}
"
`
"
'\3@g'
"
${
VM_DIR
}
/
${
VM_NAME
}
.vbox"
...
...
This diff is collapsed.
Click to expand it.
vm-start
+
2
−
3
View file @
05f25a59
...
...
@@ -42,7 +42,7 @@ eval set -- "$OPTS"
while
true
;
do
case
"
$1
"
in
-f
|
--fullscreen
)
FULLSCREEN
=
"1"
;
shift
;;
-g
|
--gui
)
FULLSCREEN
=
""
;
shift
;;
-g
|
--gui
)
FULLSCREEN
=
"
0
"
;
shift
;;
-r
|
--no-run
)
NO_RUN
=
"1"
;
shift
;;
-i
|
--no-init
)
NO_INIT
=
"1"
;
shift
;;
--
)
shift
;
break
;;
...
...
@@ -119,7 +119,7 @@ vm_start_init () {
vm_start_run
()
{
# --fullscreen?
if
[
"
${
FULLSCREEN
}
"
!
=
""
]
;
then
if
[
"
${
FULLSCREEN
}
"
=
=
"
1
"
]
;
then
# VBoxManage has no option for fullscreen mode, use VBoxSDL (no menu available in fullscreen)
VBoxSDL
--startvm
"
${
VM_NAME
}
"
--fullscreen
&
# options below could be useful in setting the fullscreen resolution, when known
...
...
@@ -137,7 +137,6 @@ if [ $DEBUG -eq 1 ]; then
echo
"fullscreen =
$FULLSCREEN
"
echo
"no-init =
$NO_INIT
"
echo
"no-run =
$NO_RUN
"
exit
1
fi
# check if vm exists
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment