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
653d6f2d
Commit
653d6f2d
authored
9 years ago
by
Bob Mottram
Browse files
Options
Downloads
Patches
Plain Diff
Fixed username and password when generic images are created
parent
39e2d679
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
src/freedombone-config
+7
-7
7 additions, 7 deletions
src/freedombone-config
src/freedombone-image
+9
-0
9 additions, 0 deletions
src/freedombone-image
with
16 additions
and
7 deletions
src/freedombone-config
+
7
−
7
View file @
653d6f2d
...
...
@@ -34,7 +34,7 @@ NO_OF_ARGS=$#
PROJECT_NAME
=
'freedombone'
# username created by default within a debian image
DEFAULT
_IMAGE_USERNAME
=
'fbone'
GENERIC
_IMAGE_USERNAME
=
'fbone'
export
TEXTDOMAIN
=
${
PROJECT_NAME
}
-config
export
TEXTDOMAINDIR
=
"/usr/share/locale"
...
...
@@ -475,9 +475,9 @@ function interactive_gpg {
esac
case
$(
cat
$data
)
in
1
)
if
[
-d
/home/
$MY_USERNAME
/.gnupg
]
;
then
rm
-rf
/home/
$MY_USERNAME
/.gnupg
fi
break
;;
rm
-rf
/home/
$MY_USERNAME
/.gnupg
fi
break
;;
2
)
interactive_gpg_from_usb
break
;;
3
)
interactive_gpg_from_remote
...
...
@@ -653,7 +653,7 @@ function interactive_configuration {
fi
fi
if
[
-d
/home/
$
DEFAULT
_IMAGE_USERNAME
]
;
then
if
[
-d
/home/
$
GENERIC
_IMAGE_USERNAME
]
;
then
# when installing from an image which comes with a known default user account
selected_username
=
while
[
!
$selected_username
]
...
...
@@ -673,9 +673,9 @@ function interactive_configuration {
if
[[
$possible_username
!=
*
' '
*
&&
$possible_username
!=
*
'/'
*
&&
$possible_username
!=
*
'\'
*
&&
$possible_username
!=
*
'*'
*
]]
;
then
if
[
$possible_username
]
;
then
if
[
${#
possible_username
}
-gt
1
]
;
then
if
[[
$possible_username
!=
$
DEFAULT
_IMAGE_USERNAME
]]
;
then
if
[[
$possible_username
!=
$
GENERIC
_IMAGE_USERNAME
]]
;
then
MY_USERNAME
=
$(
cat
$data
)
usermod
-l
$MY_USERNAME
$
DEFAULT
_IMAGE_USERNAME
usermod
-l
$MY_USERNAME
$
GENERIC
_IMAGE_USERNAME
usermod
-d
/home/
$MY_USERNAME
-m
$MY_USERNAME
break
fi
...
...
This diff is collapsed.
Click to expand it.
src/freedombone-image
+
9
−
0
View file @
653d6f2d
...
...
@@ -33,6 +33,10 @@ PROJECT_NAME='freedombone'
export
TEXTDOMAIN
=
${
PROJECT_NAME
}
-image
export
TEXTDOMAINDIR
=
"/usr/share/locale"
# fixed username and password when the --generic option is used
GENERIC_IMAGE_USERNAME
=
'fbone'
GENERIC_IMAGE_PASSWORD
=
'freedombone'
IMAGE_TYPE
=
'beaglebone'
CURR_DIR
=
$(
pwd
)
CURR_USER
=
$(
echo
$USER
)
...
...
@@ -156,6 +160,11 @@ if [[ $INTERACTIVE == "yes" || $INTERACTIVE == "y" || $INTERACTIVE == "Yes" ]];
fi
fi
if
[[
$GENERIC_IMAGE
==
"yes"
]]
;
then
USERNAME
=
$GENERIC_IMAGE_USERNAME
PASSWORD
=
$GENERIC_IMAGE_PASSWORD
fi
if
[
!
$PASSWORD
]
;
then
# generate a random password
PASSWORD
=
"
$(
openssl rand
-base64
10 |
cut
-c1-8
)
"
...
...
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