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
2b501116
Commit
2b501116
authored
Apr 14, 2016
by
Mikhail Efremov
Committed by
Michael Shigorin
Jul 16, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
services: Don't touch services already listed in the config
If service already listed in the config files, then ignore status in the profiles variables.
parent
b6e5d3df
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
3 deletions
+14
-3
10-services
features.in/services/install2/image-scripts.d/10-services
+14
-3
No files found.
features.in/services/install2/image-scripts.d/10-services
View file @
2b501116
...
...
@@ -7,16 +7,27 @@
# NB: install2 is not a rootfs, handling differs either
STATUS
=
`
mktemp
`
CONFDIR
=
/usr/share/install2
CHECK_FILES
=
.
shell-config
switch
()
{
[
-n
"
$CHECK_FILES
"
]
&&
\
egrep
-qs
"^[[:blank:]]*
$1
(.service|.socket)?[[:blank:]]*$"
\
$CHECK_FILES
&&
return
||
:
case
"
$2
"
in
on|off
)
shell_config_set
"
$STATUS
"
"
$1
"
"
$2
"
;;
esac
}
for
f
in
services-on services-off systemd-enabled systemd-disabled
;
do
[
-s
"
$CONFDIR
/
$f
"
]
||
continue
CHECK_FILES
=
"
$CHECK_FILES
$CONFDIR
/
$f
"
done
# defaults (most likely features.in ones)
for
i
in
$GLOBAL_DEFAULT_SERVICES_ENABLE
;
do
switch
$i
on
;
done
for
i
in
$GLOBAL_DEFAULT_SERVICES_DISABLE
;
do
switch
$i
off
;
done
...
...
@@ -32,11 +43,11 @@ SERVICES="$(echo $SERVICES | sort -u)"
for
i
in
$SERVICES
;
do
onoff
=
"
$(
shell_config_get
"
$STATUS
"
"
$i
"
)
"
[
-n
"
$onoff
"
]
||
continue
echo
"
$i
"
>>
/usr/share/install2
/services-
"
$onoff
"
echo
"
$i
"
>>
"
$CONFDIR
"
/services-
"
$onoff
"
done
cp
-a
/usr/share/install2
/
{
services-on,systemd-enabled
}
cp
-a
/usr/share/install2
/
{
services-off,systemd-disabled
}
cp
-a
"
$CONFDIR
"
/
{
services-on,systemd-enabled
}
cp
-a
"
$CONFDIR
"
/
{
services-off,systemd-disabled
}
rm
"
$STATUS
"
...
...
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