Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
L
linuxconf
Manage
Activity
Members
Labels
Plan
Issues
0
Issue boards
Milestones
Wiki
Code
Merge requests
0
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Model registry
Operate
Environments
Terraform modules
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
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Recolic
linuxconf
Commits
e241a42b
There was an error fetching the commit references. Please try again later.
Commit
e241a42b
authored
3 months ago
by
Recolic
Browse files
Options
Downloads
Patches
Plain Diff
.dev.prog
parent
f3622b48
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
README.md
+1
-1
1 addition, 1 deletion
README.md
linuxconf
+9
-2
9 additions, 2 deletions
linuxconf
with
10 additions
and
3 deletions
README.md
+
1
−
1
View file @
e241a42b
...
...
@@ -39,4 +39,4 @@ another example for archlinux gnome, for demo
## dependency:
bash coreutils grep
bash coreutils grep
sudo
This diff is collapsed.
Click to expand it.
linuxconf
+
9
−
2
View file @
e241a42b
...
...
@@ -36,10 +36,10 @@ function lc_include () {
function
lc_assert_user_is
()
{
# todo
[[
"
$(
whoami
)
"
=
"
$1
"
]]
||
exit
2
}
function
lc_assert_user_is_not
()
{
# todo
[[
"
$(
whoami
)
"
!=
"
$1
"
]]
||
exit
2
}
#function lc_init () {
...
...
@@ -136,7 +136,9 @@ function lci_init_if_needed () {
local uname
=
"
$(
whoami
)
"
lci_state_file_contains /etc/linuxconf.conf init_done
"
$uname
"
&&
return
0
export
LCI_SUBSHELL_OP
=
lc_init
# TODO: TODO: call init
export
LCI_SUBSHELL_OP
=
__lc_operation_unset
lci_state_file_append /etc/linuxconf.conf init_done
"
$uname
"
||
die
"lc_init functions succeeded, but unable to update /etc/linuxconf.conf"
}
...
...
@@ -159,9 +161,14 @@ function lci_startup_if_needed () {
for
uname
in
"
${
ar_uname
[@]
}
"
;
do
lci_state_file_contains
$state_file
startup_done
"
$uname
"
&&
return
0
export
LCI_SUBSHELL_OP
=
lc_startup
# TODO: TODO: call startup
# TODO: if this function only called once (from systemd as root), u must read user list from init_done_u_xxx & iterate.
# if that's the case, startup_u still needed, because on first init, startup might be called multiple times for same user.
sudo
-u
...
export
LCI_SUBSHELL_OP
=
__lc_operation_unset
lci_state_file_append
$state_file
startup_done
"
$uname
"
||
die
"lc_startup functions succeeded, but unable to update
$state_file
"
done
}
...
...
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