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
df3e388a
Commit
df3e388a
authored
Sep 28, 2016
by
Roman Mueller
Committed by
Stéphane Graber
Nov 17, 2016
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix spelling of CentOS in the templates
Signed-off-by:
Roman Mueller
<
roman.mueller@gmail.com
>
parent
c5c63275
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
14 additions
and
14 deletions
+14
-14
lxc-centos.in
templates/lxc-centos.in
+13
-13
lxc-download.in
templates/lxc-download.in
+1
-1
No files found.
templates/lxc-centos.in
View file @
df3e388a
#!/bin/bash
#!/bin/bash
#
#
# template script for generating
centos
container for LXC
# template script for generating
CentOS
container for LXC
#
#
# lxc: linux Container library
# lxc: linux Container library
...
@@ -65,7 +65,7 @@ default_path=@LXCPATH@
...
@@ -65,7 +65,7 @@ default_path=@LXCPATH@
lxc_network_type
=
veth
lxc_network_type
=
veth
lxc_network_link
=
lxcbr0
lxc_network_link
=
lxcbr0
# is this
centos
?
# is this
CentOS
?
# Alow for weird remixes like the Raspberry Pi
# Alow for weird remixes like the Raspberry Pi
#
#
# Use the Mitre standard CPE identifier for the release ID if possible...
# Use the Mitre standard CPE identifier for the release ID if possible...
...
@@ -155,7 +155,7 @@ force_mknod()
...
@@ -155,7 +155,7 @@ force_mknod()
configure_centos
()
configure_centos
()
{
{
# disable selinux in
centos
# disable selinux in
CentOS
mkdir
-p
$rootfs_path
/selinux
mkdir
-p
$rootfs_path
/selinux
echo
0
>
$rootfs_path
/selinux/enforce
echo
0
>
$rootfs_path
/selinux/enforce
...
@@ -394,7 +394,7 @@ EOF
...
@@ -394,7 +394,7 @@ EOF
download_centos
()
download_centos
()
{
{
# check the mini
centos
was not already downloaded
# check the mini
CentOS
was not already downloaded
INSTALL_ROOT
=
$cache
/partial
INSTALL_ROOT
=
$cache
/partial
mkdir
-p
$INSTALL_ROOT
mkdir
-p
$INSTALL_ROOT
if
[
$?
-ne
0
]
;
then
if
[
$?
-ne
0
]
;
then
...
@@ -402,8 +402,8 @@ download_centos()
...
@@ -402,8 +402,8 @@ download_centos()
return
1
return
1
fi
fi
# download a mini
centos
into a cache
# download a mini
CentOS
into a cache
echo
"Downloading
centos
minimal ..."
echo
"Downloading
CentOS
minimal ..."
YUM0
=
"yum --installroot
$INSTALL_ROOT
-y --nogpgcheck"
YUM0
=
"yum --installroot
$INSTALL_ROOT
-y --nogpgcheck"
if
yum
-h
|
grep
-q
'releasever=RELEASEVER'
;
then
if
yum
-h
|
grep
-q
'releasever=RELEASEVER'
;
then
...
@@ -498,7 +498,7 @@ EOF
...
@@ -498,7 +498,7 @@ EOF
copy_centos
()
copy_centos
()
{
{
# make a local copy of the mini
centos
# make a local copy of the mini
CentOS
echo
-n
"Copying rootfs to
$rootfs_path
..."
echo
-n
"Copying rootfs to
$rootfs_path
..."
#cp -a $cache/rootfs-$arch $rootfs_path || return 1
#cp -a $cache/rootfs-$arch $rootfs_path || return 1
# i prefer rsync (no reason really)
# i prefer rsync (no reason really)
...
@@ -532,14 +532,14 @@ install_centos()
...
@@ -532,14 +532,14 @@ install_centos()
if
[
!
-e
"
$cache
/rootfs"
]
;
then
if
[
!
-e
"
$cache
/rootfs"
]
;
then
download_centos
download_centos
if
[
$?
-ne
0
]
;
then
if
[
$?
-ne
0
]
;
then
echo
"Failed to download '
centos
base'"
echo
"Failed to download '
CentOS
base'"
return
1
return
1
fi
fi
else
else
echo
"Cache found. Updating..."
echo
"Cache found. Updating..."
update_centos
update_centos
if
[
$?
-ne
0
]
;
then
if
[
$?
-ne
0
]
;
then
echo
"Failed to update '
centos
base', continuing with last known good cache"
echo
"Failed to update '
CentOS
base', continuing with last known good cache"
else
else
echo
"Update finished"
echo
"Update finished"
fi
fi
...
@@ -655,7 +655,7 @@ clean()
...
@@ -655,7 +655,7 @@ clean()
exit
1
exit
1
fi
fi
echo
-n
"Purging the download cache for
centos
-
$release
..."
echo
-n
"Purging the download cache for
CentOS
-
$release
..."
rm
--preserve-root
--one-file-system
-rf
$cache
&&
echo
"Done."
||
exit
1
rm
--preserve-root
--one-file-system
-rf
$cache
&&
echo
"Done."
||
exit
1
exit
0
exit
0
...
@@ -674,7 +674,7 @@ Mandatory args:
...
@@ -674,7 +674,7 @@ Mandatory args:
Optional args:
Optional args:
-p,--path path to where the container rootfs will be created, defaults to /var/lib/lxc/name.
-p,--path path to where the container rootfs will be created, defaults to /var/lib/lxc/name.
-c,--clean clean the cache
-c,--clean clean the cache
-R,--release Cent
os release for the new container. if the host is Centos, then it will default
to the host's release.
-R,--release Cent
OS release for the new container. If the host is CentOS, then it will default
to the host's release.
--fqdn fully qualified domain name (FQDN) for DNS and system naming
--fqdn fully qualified domain name (FQDN) for DNS and system naming
--repo repository to use (url)
--repo repository to use (url)
-a,--arch Define what arch the container will be [i686,x86_64]
-a,--arch Define what arch the container will be [i686,x86_64]
...
@@ -875,13 +875,13 @@ fi
...
@@ -875,13 +875,13 @@ fi
install_centos
install_centos
if
[
$?
-ne
0
]
;
then
if
[
$?
-ne
0
]
;
then
echo
"failed to install
centos
"
echo
"failed to install
CentOS
"
exit
1
exit
1
fi
fi
configure_centos
configure_centos
if
[
$?
-ne
0
]
;
then
if
[
$?
-ne
0
]
;
then
echo
"failed to configure
centos
for a container"
echo
"failed to configure
CentOS
for a container"
exit
1
exit
1
fi
fi
...
...
templates/lxc-download.in
View file @
df3e388a
...
@@ -575,7 +575,7 @@ for file in $TEMPLATE_FILES; do
...
@@ -575,7 +575,7 @@ for file in $TEMPLATE_FILES; do
sed
-i
"s#LXC_HOOK_DIR#
$LXC_HOOK_DIR
#g"
$file
sed
-i
"s#LXC_HOOK_DIR#
$LXC_HOOK_DIR
#g"
$file
done
done
# prevent mingetty from calling vhangup(2) since it fails with userns on Cent
os
/ Oracle
# prevent mingetty from calling vhangup(2) since it fails with userns on Cent
OS
/ Oracle
if
[
-f
${
LXC_ROOTFS
}
/etc/init/tty.conf
]
;
then
if
[
-f
${
LXC_ROOTFS
}
/etc/init/tty.conf
]
;
then
sed
-i
's|mingetty|mingetty --nohangup|'
${
LXC_ROOTFS
}
/etc/init/tty.conf
sed
-i
's|mingetty|mingetty --nohangup|'
${
LXC_ROOTFS
}
/etc/init/tty.conf
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