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
Ximper Linux
mkimage-profiles
Commits
0112879c
Commit
0112879c
authored
Oct 17, 2016
by
Michael Shigorin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
services: optimize loop
No use to distinguish between "on" and "off" each iteration when the resulting files with differing names should end up identical.
parent
572ba277
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
11 deletions
+3
-11
10-services
features.in/services/install2/image-scripts.d/10-services
+3
-11
No files found.
features.in/services/install2/image-scripts.d/10-services
View file @
0112879c
...
@@ -33,19 +33,11 @@ for i in $SERVICES; do
...
@@ -33,19 +33,11 @@ for i in $SERVICES; do
onoff
=
"
$(
shell_config_get
"
$STATUS
"
"
$i
"
)
"
onoff
=
"
$(
shell_config_get
"
$STATUS
"
"
$i
"
)
"
[
-n
"
$onoff
"
]
||
continue
[
-n
"
$onoff
"
]
||
continue
echo
"
$i
"
>>
/usr/share/install2/services-
"
$onoff
"
echo
"
$i
"
>>
/usr/share/install2/services-
"
$onoff
"
# create systemd-specific hooks
case
"
$onoff
"
in
on
)
action
=
enabled
;;
off
)
action
=
disabled
;;
*
)
continue
;;
esac
echo
"
$i
"
>>
/usr/share/install2/systemd-
"
$action
"
done
done
cp
-a
/usr/share/install2/
{
services-on,systemd-enabled
}
cp
-a
/usr/share/install2/
{
services-off,systemd-disabled
}
rm
"
$STATUS
"
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