Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
B
base
Manage
Activity
Members
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Analyze
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
JupyterLab
CUDA
R
base
Commits
49b0fd64
Verified
Commit
49b0fd64
authored
6 months ago
by
Olivier Benz
Browse files
Options
Downloads
Patches
Plain Diff
Update script 10-env.sh
parent
743f1055
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Pipeline
#31142
passed
6 months ago
Stage: build1
Stage: build2
Stage: .post
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
base/scripts/usr/local/bin/before-notebook.d/10-env.sh
+6
-14
6 additions, 14 deletions
base/scripts/usr/local/bin/before-notebook.d/10-env.sh
with
6 additions
and
14 deletions
base/scripts/usr/local/bin/before-notebook.d/10-env.sh
+
6
−
14
View file @
49b0fd64
...
...
@@ -8,15 +8,11 @@ set -e
LANG
=
${
LANG
:
=en_US.UTF-8
}
TZ
=
${
TZ
:
=Etc/UTC
}
if
[
"
$(
id
-u
)
"
==
0
]
;
then
# Update timezone if needed
if
[
"
$TZ
"
!=
"Etc/UTC"
]
;
then
_log
"Setting TZ to
$TZ
"
ln
-snf
"/usr/share/zoneinfo/
$TZ
"
/etc/localtime
\
&&
echo
"
$TZ
"
>
/etc/timezone
fi
# Info about timezone
_log
"TZ is set to
$TZ
(/etc/localtime and /etc/timezone remain unchanged)"
# Add/Update locale if needed
if
[
"
$(
id
-u
)
"
==
0
]
;
then
# Add/Update locale if requested
if
[
-n
"
$LANGS
"
]
;
then
for
i
in
$LANGS
;
do
sed
-i
"s/#
$i
/
$i
/g"
/etc/locale.gen
...
...
@@ -29,14 +25,9 @@ if [ "$(id -u)" == 0 ] ; then
locale-gen
--keep-existing
fi
update-locale
--reset
LANG
=
"
$LANG
"
# Info about locale
_log
"LANG is set to
$LANG
"
else
# Warn if the user wants to change the timezone but hasn't started the
# container as root.
if
[
"
$TZ
"
!=
"Etc/UTC"
]
;
then
_log
"WARNING: Setting TZ to
$TZ
but /etc/localtime and /etc/timezone remain unchanged!"
fi
# Warn if the user wants to add locales but hasn't started the container as
# root.
if
[
-n
"
$LANGS
"
]
;
then
...
...
@@ -48,6 +39,7 @@ else
.
/etc/default/locale
_log
"WARNING: Resetting LANG to
$LANG
"
else
# Info about locale
_log
"LANG is set to
$LANG
"
fi
fi
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