Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
F
freedombone
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
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
Context Sensitive Group
freedombone
Commits
bbac5802
Commit
bbac5802
authored
9 years ago
by
Bob Mottram
Browse files
Options
Downloads
Patches
Plain Diff
Image creation interactive mode
parent
cad6c926
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
man/freedombone-image.1.gz
+0
-0
0 additions, 0 deletions
man/freedombone-image.1.gz
src/freedombone-image
+16
-1
16 additions, 1 deletion
src/freedombone-image
with
16 additions
and
1 deletion
man/freedombone-image.1.gz
+
0
−
0
View file @
bbac5802
No preview for this file type
This diff is collapsed.
Click to expand it.
src/freedombone-image
+
16
−
1
View file @
bbac5802
...
...
@@ -61,6 +61,9 @@ MINIMUM_PASSWORD_LENGTH=10
# Optional ssh public key to allow
SSH_PUBKEY
=
"no"
# interactive mode
INTERACTIVE
=
"no"
while
[[
$#
>
1
]]
do
key
=
"
$1
"
...
...
@@ -122,6 +125,10 @@ case $key in
shift
NAMESERVER2
=
"
$1
"
;;
-i
|
--interactive
)
shift
INTERACTIVE
=
"
$1
"
;;
*
)
# unknown option
;;
...
...
@@ -129,6 +136,14 @@ esac
shift
done
if
[[
$INTERACTIVE
==
"yes"
||
$INTERACTIVE
==
"y"
||
$INTERACTIVE
==
"Yes"
]]
;
then
freedombone-config
if
[
-f
freedombone.cfg
]
;
then
CONFIG_FILENAME
=
freedombone.cfg
DEFAULT_DOMAIN_NAME
=
$(
cat
$CONFIG_FILENAME
|
grep
'DEFAULT_DOMAIN_NAME'
|
awk
-F
'='
'{print $2}'
)
fi
fi
if
[
!
$PASSWORD
]
;
then
# generate a random password
PASSWORD
=
"
$(
openssl rand
-base64
10 |
cut
-c1-8
)
"
...
...
@@ -177,7 +192,7 @@ make $IMAGE_TYPE \
PROJECT_NAME
=
"
$PROJECT_NAME
"
\
CONFIG_FILENAME
=
"
$CONFIG_FILENAME
"
\
IMAGE_SIZE
=
"
$IMAGE_SIZE
"
\
SSH_PUBKEY
=
"
$SSH_PUBKEY
"
SSH_PUBKEY
=
"
$SSH_PUBKEY
"
shopt
-s
nullglob
imgfiles
=(
build/
${
PROJECT_NAME
}*
.img
)
...
...
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