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
6983d54c
Commit
6983d54c
authored
Sep 30, 2022
by
Anton Midyukov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
services: add systemd-logind support
parent
ee62c83a
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
34 additions
and
2 deletions
+34
-2
config.mk
features.in/services/config.mk
+3
-0
10-services
features.in/services/install2/image-scripts.d/10-services
+24
-1
10-services
features.in/services/rootfs/image-scripts.d/10-services
+7
-1
No files found.
features.in/services/config.mk
View file @
6983d54c
...
@@ -6,6 +6,9 @@ use/services: sub/rootfs
...
@@ -6,6 +6,9 @@ use/services: sub/rootfs
@$(call xport,SERVICES_DISABLE)
@$(call xport,SERVICES_DISABLE)
@$(call xport,SYSTEMD_SERVICES_ENABLE)
@$(call xport,SYSTEMD_SERVICES_ENABLE)
@$(call xport,SYSTEMD_SERVICES_DISABLE)
@$(call xport,SYSTEMD_SERVICES_DISABLE)
@$(call xport,SYSTEMD_USER_SERVICES_ENABLE)
@$(call xport,SYSTEMD_USER_SERVICES_DISABLE)
use/services/lvm2-disable: use/services
use/services/lvm2-disable: use/services
@$(call add,DEFAULT_SERVICES_DISABLE,lvm2-lvmetad)
@$(call add,DEFAULT_SERVICES_DISABLE,lvm2-lvmetad)
...
...
features.in/services/install2/image-scripts.d/10-services
View file @
6983d54c
...
@@ -26,7 +26,7 @@ switch() {
...
@@ -26,7 +26,7 @@ switch() {
[
"
$sname
"
=
"
$1
"
]
||
shell_config_del
"
$STATUS
"
"
$sname
"
[
"
$sname
"
=
"
$1
"
]
||
shell_config_del
"
$STATUS
"
"
$sname
"
case
"
$2
"
in
case
"
$2
"
in
on|off
)
on|off
|enabled|disabled
)
shell_config_set
"
$STATUS
"
"
$1
"
"
$2
"
;;
shell_config_set
"
$STATUS
"
"
$1
"
"
$2
"
;;
esac
esac
}
}
...
@@ -79,4 +79,27 @@ fi
...
@@ -79,4 +79,27 @@ fi
rm
"
$STATUS
"
rm
"
$STATUS
"
# Enable|Disable logind services
STATUS
=
`
mktemp
`
CHECK_FILES
=
for
f
in
systemd-user-enabled systemd-user-disabled
;
do
[
-s
"
$CONFDIR
/
$f
"
]
||
continue
CHECK_FILES
=
"
$CHECK_FILES
$CONFDIR
/
$f
"
done
for
i
in
$GLOBAL_SYSTEMD_USER_SERVICES_ENABLE
;
do
switch
$i
enabled
;
done
for
i
in
$GLOBAL_SYSTEMD_USER_SERVICES_DISABLE
;
do
switch
$i
disabled
;
done
SERVICES
=
"
$GLOBAL_SYSTEMD_USER_SERVICES_ENABLE
$GLOBAL_SYSTEMD_USER_SERVICES_DISABLE
"
SERVICES
=
"
$(
echo
"
$SERVICES
"
|
tr
' '
'\n'
|
sort
-u
)
"
for
i
in
$SERVICES
;
do
onoff
=
"
$(
shell_config_get
"
$STATUS
"
"
$i
"
)
"
[
-n
"
$onoff
"
]
||
continue
echo
"
$i
"
>>
"
$CONFDIR
"
/systemd-user-
"
$onoff
"
done
rm
"
$STATUS
"
:
:
features.in/services/rootfs/image-scripts.d/10-services
View file @
6983d54c
...
@@ -4,6 +4,7 @@
...
@@ -4,6 +4,7 @@
CHKCONFIG
=
CHKCONFIG
=
SYSTEMCTL
=
SYSTEMCTL
=
SYSTEMD_USER
=
[
!
-x
/sbin/chkconfig
]
||
CHKCONFIG
=
1
[
!
-x
/sbin/chkconfig
]
||
CHKCONFIG
=
1
[
!
-x
/bin/systemctl
]
||
SYSTEMCTL
=
1
[
!
-x
/bin/systemctl
]
||
SYSTEMCTL
=
1
...
@@ -19,7 +20,7 @@ switch() {
...
@@ -19,7 +20,7 @@ switch() {
esac
esac
{
{
[
-z
"
$SYSTEMCTL
"
]
||
/bin/systemctl
--no-reload
$sc
$1
[
-z
"
$SYSTEMCTL
"
]
||
/bin/systemctl
--no-reload
$
SYSTEMD_USER
$
sc
$1
[
-z
"
$CHKCONFIG
"
]
||
/sbin/chkconfig
$1
$cc
[
-z
"
$CHKCONFIG
"
]
||
/sbin/chkconfig
$1
$cc
}
# 2>/dev/null
}
# 2>/dev/null
}
}
...
@@ -37,4 +38,9 @@ CHKCONFIG=
...
@@ -37,4 +38,9 @@ CHKCONFIG=
for
i
in
$GLOBAL_SYSTEMD_SERVICES_ENABLE
;
do
switch
$i
on
;
done
for
i
in
$GLOBAL_SYSTEMD_SERVICES_ENABLE
;
do
switch
$i
on
;
done
for
i
in
$GLOBAL_SYSTEMD_SERVICES_DISABLE
;
do
switch
$i
off
;
done
for
i
in
$GLOBAL_SYSTEMD_SERVICES_DISABLE
;
do
switch
$i
off
;
done
# systemd-logind services
SYSTEMD_USER
=
'--user --global'
for
i
in
$GLOBAL_SYSTEMD_USER_SERVICES_ENABLE
;
do
switch
$i
on
;
done
for
i
in
$GLOBAL_SYSTEMD_USER_SERVICES_DISABLE
;
do
switch
$i
off
;
done
:
:
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