Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
L
lxc
Project
Overview
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
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Chen Yisong
lxc
Commits
ade83cbf
Commit
ade83cbf
authored
Jul 15, 2016
by
Andreas Freudenberg
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
templates: make shellcheck (Ubuntu: 0.3.7-5 amd64) most possible happy
Signed-off-by:
Andreas Freudenberg
<
andreas.freudenberg@licomonch.net
>
parent
bf39edb3
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
3 deletions
+5
-3
lxc-debian.in
templates/lxc-debian.in
+5
-3
No files found.
templates/lxc-debian.in
View file @
ade83cbf
...
@@ -244,7 +244,8 @@ configure_debian_systemd()
...
@@ -244,7 +244,8 @@ configure_debian_systemd()
# Fix getty-static-service as debootstrap does not install dbus
# Fix getty-static-service as debootstrap does not install dbus
if
[
-e
"
$rootfs
//lib/systemd/system/getty-static.service"
]
;
then
if
[
-e
"
$rootfs
//lib/systemd/system/getty-static.service"
]
;
then
local
tty_services
=
$(for
i
in
$(
seq
2
"
$num_tty
"
)
;
do
echo
-n
"getty@tty
${
i
}
.service "
;
done
;
)
local
tty_services
tty_services
=
$(for
i
in
$(
seq
2
"
$num_tty
"
)
;
do
echo
-n
"getty@tty
${
i
}
.service "
;
done
;
)
sed
's/ getty@tty.*/'
"
$tty_services
"
'/g'
\
sed
's/ getty@tty.*/'
"
$tty_services
"
'/g'
\
"
$rootfs
/lib/systemd/system/getty-static.service"
|
\
"
$rootfs
/lib/systemd/system/getty-static.service"
|
\
sed
's/\(tty2-tty\)[5-9]/\1'
"
${
num_tty
}
"
'/g'
>
"
$rootfs
/etc/systemd/system/getty-static.service"
sed
's/\(tty2-tty\)[5-9]/\1'
"
${
num_tty
}
"
'/g'
>
"
$rootfs
/etc/systemd/system/getty-static.service"
...
@@ -490,7 +491,7 @@ copy_configuration()
...
@@ -490,7 +491,7 @@ copy_configuration()
# Generate the configuration file
# Generate the configuration file
# if there is exactly one veth network entry, make sure it has an
# if there is exactly one veth network entry, make sure it has an
# associated hwaddr.
# associated hwaddr.
nics
=
$(
grep
-
e
'^lxc\.network\.type[ \t]*=[ \t]*veth'
"
$path
/config"
|
wc
-l
)
nics
=
$(
grep
-
ce
'^lxc\.network\.type[ \t]*=[ \t]*veth'
"
$path
/config"
)
if
[
"
$nics
"
-eq
1
]
;
then
if
[
"
$nics
"
-eq
1
]
;
then
grep
-q
"^lxc.network.hwaddr"
"
$path
/config"
||
sed
-i
-e
"/^lxc
\.
network
\.
type[
\t
]*=[
\t
]*veth/a lxc.network.hwaddr = 00:16:3e:
$(
openssl rand
-hex
3|
sed
's/\(..\)/\1:/g; s/.$//'
)
"
"
$path
/config"
grep
-q
"^lxc.network.hwaddr"
"
$path
/config"
||
sed
-i
-e
"/^lxc
\.
network
\.
type[
\t
]*=[
\t
]*veth/a lxc.network.hwaddr = 00:16:3e:
$(
openssl rand
-hex
3|
sed
's/\(..\)/\1:/g; s/.$//'
)
"
"
$path
/config"
fi
fi
...
@@ -559,7 +560,8 @@ EOF
...
@@ -559,7 +560,8 @@ EOF
# Install Packages in container
# Install Packages in container
if
[
-n
"
${
packages
}
"
]
;
then
if
[
-n
"
${
packages
}
"
]
;
then
local
pack_list
=
"
$(
echo
"
${
packages
}
"
|
sed
's/,/ /g'
)
"
local
pack_list
pack_list
=
"
${
packages
//,/
}
"
echo
"Installing packages:
${
pack_list
}
"
echo
"Installing packages:
${
pack_list
}
"
install_packages
"
${
rootfs
}
"
"
${
pack_list
}
"
install_packages
"
${
rootfs
}
"
"
${
pack_list
}
"
fi
fi
...
...
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