Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
M
mkimage-profiles
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Anton Palgunov
mkimage-profiles
Commits
a4b789d6
Commit
a4b789d6
authored
Dec 08, 2023
by
Anton Midyukov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
datetime: initial feature
parent
6ff35684
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
37 additions
and
0 deletions
+37
-0
README
features.in/datetime/README
+6
-0
config.mk
features.in/datetime/config.mk
+4
-0
05-datetime
features.in/datetime/rootfs/image-scripts.d/05-datetime
+27
-0
No files found.
features.in/datetime/README
0 → 100644
View file @
a4b789d6
=== features.in/datetime ===
Данная фича предназначена для настройки даты, времени, часовых поясов и т.д.
Пока доступна только переменная TIME_UTC для выбора между местным временем и
UTC. Задайте TIME_UTC=0, чтобы переключиться на местное время.
features.in/datetime/config.mk
0 → 100644
View file @
a4b789d6
use/datetime:
@$(call add_feature)
@$(call try,TIME_UTC,1)
@$(call xport,TIME_UTC)
features.in/datetime/rootfs/image-scripts.d/05-datetime
0 → 100755
View file @
a4b789d6
#!/bin/sh -efux
adjtime_file
=
/etc/adjtime
sysconfigclock_file
=
/etc/sysconfig/clock
TIME_UTC
=
"
${
GLOBAL_TIME_UTC
:-}
"
[
"
$TIME_UTC
"
=
0
]
||
TIME_UTC
=
1
if
[
-s
"
$sysconfigclock_file
"
]
;
then
if
[
"
$TIME_UTC
"
=
1
]
;
then
sed
-i
's/^UTC=.*/UTC=true/'
"
$sysconfigclock_file
"
else
sed
-i
's/^UTC=.*/UTC=false/'
"
$sysconfigclock_file
"
fi
fi
if
[
"
$TIME_UTC
"
=
1
]
;
then
ADJTIME
=
UTC
else
ADJTIME
=
LOCAL
fi
cat
>
"
$adjtime_file
"
<<
EOF
0.0 0 0
0
$ADJTIME
EOF
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment