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
853d58fd
Commit
853d58fd
authored
Nov 19, 2013
by
Elan Ruusamäe
Committed by
Stéphane Graber
Nov 25, 2013
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
use awk, instead of 'grep | awk'
Signed-off-by:
Elan Ruusamäe
<
glen@delfi.ee
>
Acked-by:
Stéphane Graber
<
stgraber@ubuntu.com
>
parent
1b29d73c
Hide whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
10 additions
and
10 deletions
+10
-10
lxc-altlinux.in
templates/lxc-altlinux.in
+1
-1
lxc-busybox.in
templates/lxc-busybox.in
+1
-1
lxc-debian.in
templates/lxc-debian.in
+1
-1
lxc-fedora.in
templates/lxc-fedora.in
+1
-1
lxc-openmandriva.in
templates/lxc-openmandriva.in
+1
-1
lxc-opensuse.in
templates/lxc-opensuse.in
+1
-1
lxc-plamo.in
templates/lxc-plamo.in
+1
-1
lxc-sshd.in
templates/lxc-sshd.in
+1
-1
lxc-ubuntu-cloud.in
templates/lxc-ubuntu-cloud.in
+1
-1
lxc-ubuntu.in
templates/lxc-ubuntu.in
+1
-1
No files found.
templates/lxc-altlinux.in
View file @
853d58fd
...
@@ -427,7 +427,7 @@ fi
...
@@ -427,7 +427,7 @@ fi
# check for 'lxc.rootfs' passed in through default config by lxc-create
# check for 'lxc.rootfs' passed in through default config by lxc-create
if
[
-z
"
$rootfs_path
"
]
;
then
if
[
-z
"
$rootfs_path
"
]
;
then
if
grep
-q
'^lxc.rootfs'
$path
/config 2>/dev/null
;
then
if
grep
-q
'^lxc.rootfs'
$path
/config 2>/dev/null
;
then
rootfs_path
=
`
grep
'lxc.rootfs ='
$path
/config |
awk
-F
=
'{ print $2 }'
`
rootfs_path
=
$(
awk
-F
=
'/^lxc.rootfs =/{ print $2 }'
$path
/config
)
else
else
rootfs_path
=
$path
/
$name
/rootfs
rootfs_path
=
$path
/
$name
/rootfs
fi
fi
...
...
templates/lxc-busybox.in
View file @
853d58fd
...
@@ -341,7 +341,7 @@ fi
...
@@ -341,7 +341,7 @@ fi
config
=
"
$path
/config"
config
=
"
$path
/config"
if
[
-z
"
$rootfs
"
]
;
then
if
[
-z
"
$rootfs
"
]
;
then
if
grep
-q
'^lxc.rootfs'
$config
2>/dev/null
;
then
if
grep
-q
'^lxc.rootfs'
$config
2>/dev/null
;
then
rootfs
=
`
grep
'lxc.rootfs ='
$config
|
awk
-F
=
'{ print $2 }'
`
rootfs
=
$(
awk
-F
=
'/^lxc.rootfs =/{ print $2 }'
$config
)
else
else
rootfs
=
$path
/rootfs
rootfs
=
$path
/rootfs
fi
fi
...
...
templates/lxc-debian.in
View file @
853d58fd
...
@@ -383,7 +383,7 @@ fi
...
@@ -383,7 +383,7 @@ fi
config
=
"
$path
/config"
config
=
"
$path
/config"
if
[
-z
"
$rootfs
"
]
;
then
if
[
-z
"
$rootfs
"
]
;
then
if
grep
-q
'^lxc.rootfs'
$config
2>/dev/null
;
then
if
grep
-q
'^lxc.rootfs'
$config
2>/dev/null
;
then
rootfs
=
`
grep
'lxc.rootfs ='
$config
|
awk
-F
=
'{ print $2 }'
`
rootfs
=
$(
awk
-F
=
'/^lxc.rootfs =/{ print $2 }'
$config
)
else
else
rootfs
=
$path
/rootfs
rootfs
=
$path
/rootfs
fi
fi
...
...
templates/lxc-fedora.in
View file @
853d58fd
...
@@ -1030,7 +1030,7 @@ if [ -z "$rootfs_path" ]; then
...
@@ -1030,7 +1030,7 @@ if [ -z "$rootfs_path" ]; then
rootfs_path
=
$path
/rootfs
rootfs_path
=
$path
/rootfs
# check for 'lxc.rootfs' passed in through default config by lxc-create
# check for 'lxc.rootfs' passed in through default config by lxc-create
if
grep
-q
'^lxc.rootfs'
$path
/config 2>/dev/null
;
then
if
grep
-q
'^lxc.rootfs'
$path
/config 2>/dev/null
;
then
rootfs_path
=
`
grep
'lxc.rootfs ='
$path
/config |
awk
-F
=
'{ print $2 }'
`
rootfs_path
=
$(
awk
-F
=
'/^lxc.rootfs =/{ print $2 }'
$path
/config
)
fi
fi
fi
fi
config_path
=
$default_path
/
$name
config_path
=
$default_path
/
$name
...
...
templates/lxc-openmandriva.in
View file @
853d58fd
...
@@ -420,7 +420,7 @@ fi
...
@@ -420,7 +420,7 @@ fi
# check for 'lxc.rootfs' passed in through default config by lxc-create
# check for 'lxc.rootfs' passed in through default config by lxc-create
if
[
-z
"
$rootfs_path
"
]
;
then
if
[
-z
"
$rootfs_path
"
]
;
then
if
grep
-q
'^lxc.rootfs'
$path
/config 2>/dev/null
;
then
if
grep
-q
'^lxc.rootfs'
$path
/config 2>/dev/null
;
then
rootfs_path
=
`
grep
'lxc.rootfs ='
$path
/config |
awk
-F
=
'{ print $2 }'
`
rootfs_path
=
$(
awk
-F
=
'/^lxc.rootfs =/{ print $2 }'
$path
/config
)
else
else
rootfs_path
=
$path
/
$name
/rootfs
rootfs_path
=
$path
/
$name
/rootfs
fi
fi
...
...
templates/lxc-opensuse.in
View file @
853d58fd
...
@@ -390,7 +390,7 @@ fi
...
@@ -390,7 +390,7 @@ fi
config
=
"
$path
/config"
config
=
"
$path
/config"
if
[
-z
"
$rootfs
"
]
;
then
if
[
-z
"
$rootfs
"
]
;
then
if
grep
-q
'^lxc.rootfs'
$config
2>/dev/null
;
then
if
grep
-q
'^lxc.rootfs'
$config
2>/dev/null
;
then
rootfs
=
`
grep
'lxc.rootfs ='
$config
|
awk
-F
=
'{ print $2 }'
`
rootfs
=
$(
awk
-F
=
'/^lxc.rootfs =/{ print $2 }'
$config
)
else
else
rootfs
=
$path
/rootfs
rootfs
=
$path
/rootfs
fi
fi
...
...
templates/lxc-plamo.in
View file @
853d58fd
...
@@ -367,7 +367,7 @@ dlcache=$cache/cache-${prog##*-}-$release-$arch
...
@@ -367,7 +367,7 @@ dlcache=$cache/cache-${prog##*-}-$release-$arch
rtcache
=
$cache
/rootfs-
${
prog
##*-
}
-
$release
-
$arch
rtcache
=
$cache
/rootfs-
${
prog
##*-
}
-
$release
-
$arch
if
[
-z
"
$rootfs
"
]
;
then
if
[
-z
"
$rootfs
"
]
;
then
if
grep
-q
"^lxc.rootfs"
$path
/config
;
then
if
grep
-q
"^lxc.rootfs"
$path
/config
;
then
rootfs
=
`
grep
"^lxc.rootfs"
$path
/config |
awk
-F
=
'{print $2}'
`
rootfs
=
$(
awk
-F
=
'/^lxc.rootfs =/{ print $2 }'
$path
/config
)
else
else
rootfs
=
$path
/rootfs
rootfs
=
$path
/rootfs
fi
fi
...
...
templates/lxc-sshd.in
View file @
853d58fd
...
@@ -237,7 +237,7 @@ fi
...
@@ -237,7 +237,7 @@ fi
config
=
"
$path
/config"
config
=
"
$path
/config"
if
[
-z
"
$rootfs
"
]
;
then
if
[
-z
"
$rootfs
"
]
;
then
if
grep
-q
'^lxc.rootfs'
$config
2>/dev/null
;
then
if
grep
-q
'^lxc.rootfs'
$config
2>/dev/null
;
then
rootfs
=
`
grep
'lxc.rootfs ='
$config
|
awk
-F
=
'{ print $2 }'
`
rootfs
=
$(
awk
-F
=
'/^lxc.rootfs =/{ print $2 }'
$config
)
else
else
rootfs
=
$path
/rootfs
rootfs
=
$path
/rootfs
fi
fi
...
...
templates/lxc-ubuntu-cloud.in
View file @
853d58fd
...
@@ -293,7 +293,7 @@ fi
...
@@ -293,7 +293,7 @@ fi
config
=
"
$path
/config"
config
=
"
$path
/config"
if
[
-z
"
$rootfs
"
]
;
then
if
[
-z
"
$rootfs
"
]
;
then
if
grep
-q
'^lxc.rootfs'
$config
2>/dev/null
;
then
if
grep
-q
'^lxc.rootfs'
$config
2>/dev/null
;
then
rootfs
=
`
grep
'lxc.rootfs ='
$config
|
awk
-F
=
'{ print $2 }'
`
rootfs
=
$(
awk
-F
=
'/^lxc.rootfs =/{ print $2 }'
$config
)
else
else
rootfs
=
$path
/rootfs
rootfs
=
$path
/rootfs
fi
fi
...
...
templates/lxc-ubuntu.in
View file @
853d58fd
...
@@ -669,7 +669,7 @@ config="$path/config"
...
@@ -669,7 +669,7 @@ config="$path/config"
# if $rootfs exists here, it was passed in with --rootfs
# if $rootfs exists here, it was passed in with --rootfs
if
[
-z
"
$rootfs
"
]
;
then
if
[
-z
"
$rootfs
"
]
;
then
if
grep
-q
'^lxc.rootfs'
$config
2>/dev/null
;
then
if
grep
-q
'^lxc.rootfs'
$config
2>/dev/null
;
then
rootfs
=
`
grep
'lxc.rootfs ='
$config
|
awk
-F
=
'{ print $2 }'
`
rootfs
=
$(
awk
-F
=
'/^lxc.rootfs =/{ print $2 }'
$config
)
else
else
rootfs
=
$path
/rootfs
rootfs
=
$path
/rootfs
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