Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
alpine-conf
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
16
Issues
16
List
Boards
Labels
Service Desk
Milestones
Merge Requests
4
Merge Requests
4
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
alpine
alpine-conf
Commits
07c02f67
Commit
07c02f67
authored
Nov 02, 2016
by
Jakub Jirutka
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
replace deprecated `...` syntax with $(...) in shell scripts
parent
cb474e20
Changes
10
Hide whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
22 additions
and
22 deletions
+22
-22
lbu.in
lbu.in
+3
-3
libalpine.sh.in
libalpine.sh.in
+4
-4
setup-acf.in
setup-acf.in
+2
-2
setup-alpine.in
setup-alpine.in
+1
-1
setup-apkrepos.in
setup-apkrepos.in
+2
-2
setup-bootable.in
setup-bootable.in
+1
-1
setup-dns.in
setup-dns.in
+2
-2
setup-hostname.in
setup-hostname.in
+1
-1
setup-interfaces.in
setup-interfaces.in
+4
-4
update-conf.in
update-conf.in
+2
-2
No files found.
lbu.in
View file @
07c02f67
...
...
@@ -723,8 +723,8 @@ cmd_migrate_include_exclude() {
#-----------------------------------------------------------
#
Main
cmd
=
`
echo
"$PROGRAM"
|
cut
-
s
-
d_
-
f2
`
PROGRAM
=
`
echo
"$PROGRAM"
|
cut
-
d_
-
f1
`
cmd
=
$(
echo
"$PROGRAM"
|
cut
-
s
-
d_
-
f2
)
PROGRAM
=
$(
echo
"$PROGRAM"
|
cut
-
d_
-
f1
)
if
[
-
z
"$cmd"
]
;
then
cmd
=
"$1"
[
-
z
"$cmd"
]
&&
usage
...
...
@@ -773,7 +773,7 @@ while getopts "adehlM:np:qrv" opt ; do
;;
esac
done
shift
`
expr
$
OPTIND
-
1
`
shift
$(
expr
$
OPTIND
-
1
)
trap
exit_clean
SIGINT
SIGTERM
cmd_
$
SUBCMD
"$@"
...
...
libalpine.sh.in
View file @
07c02f67
...
...
@@ -2,7 +2,7 @@
PREFIX
=
@PREFIX@
PROGRAM
=
`
basename
$0
`
PROGRAM
=
$(
basename
$0
)
:
${
ROOT
:
=/
}
[
"
${
ROOT
}
"
=
"
${
ROOT
%/
}
"
]
&&
ROOT
=
"
${
ROOT
}
/"
...
...
@@ -12,7 +12,7 @@ echon () {
if
[
X
"
$ECHON
"
=
X
]
;
then
# Determine how to "echo" without newline: "echo -n"
# or "echo ...\c"
if
[
X
`
echo
-n
`
=
X-n
]
;
then
if
[
X
$(
echo
-n
)
=
X-n
]
;
then
ECHON
=
echo
NNL
=
"
\c
"
# "
...
...
@@ -46,8 +46,8 @@ die() {
}
init_tmpdir
()
{
local
omask
=
`
umask
`
local
__tmpd
=
"/tmp/
$PROGRAM
-
${
$}
-
`
date
+%s
`
-
$RANDOM
"
local
omask
=
$(
umask
)
local
__tmpd
=
"/tmp/
$PROGRAM
-
${
$}
-
$(
date
+%s
)
-
$RANDOM
"
umask 077 || die "
umask
"
mkdir -p "
$__tmpd
" || exit 1
trap "
rm
-fr \
"
$__tmpd
\"
; exit"
0
...
...
setup-acf.in
View file @
07c02f67
...
...
@@ -23,14 +23,14 @@ while getopts "ae:hl:n" opt ; do
*
)
usage
;;
esac
done
shift
`
expr
$OPTIND
- 1
`
shift
$(
expr
$OPTIND
- 1
)
while
[
$#
-gt
0
]
;
do
pkgs
=
"
$pkgs
acf-
$1
"
shift
done
# install packages
# install packages
apk add mini_httpd
$pkgs
||
exit
1
if
[
"
$create_passwd
"
!=
"no"
]
;
then
...
...
setup-alpine.in
View file @
07c02f67
...
...
@@ -46,7 +46,7 @@ while getopts "af:c:hq" opt ; do
*
)
usage
;;
esac
done
shift
`
expr
$OPTIND
- 1
`
shift
$(
expr
$OPTIND
- 1
)
rc_sys
=
$(
openrc
--sys
)
# mount xenfs so we can detect xen dom0
...
...
setup-apkrepos.in
View file @
07c02f67
...
...
@@ -176,12 +176,12 @@ fi
MIRRORS_PATH
=
/usr/share/alpine-mirrors/MIRRORS.txt
if
[
-z
"
$MIRRORS
"
]
&&
[
-r
"
$MIRRORS_PATH
"
]
;
then
MIRRORS
=
`
cat
$MIRRORS_PATH
`
MIRRORS
=
$(
cat
$MIRRORS_PATH
)
fi
APKREPOS_PATH
=
"
${
ROOT
}
"
etc/apk/repositories
if
[
-r
"
$APKREPOS_PATH
"
]
;
then
APKREPOS
=
`
cat
"
$APKREPOS_PATH
"
`
APKREPOS
=
$(
cat
"
$APKREPOS_PATH
"
)
fi
get_alpine_release
...
...
setup-bootable.in
View file @
07c02f67
...
...
@@ -215,7 +215,7 @@ fi
srcdir
=
# Find the srcdir or srcurl. mount loopback if needed
if
[
-f
"
$src
"
/.alpine-release
]
;
then
srcdir
=
"
`
echo
$src
|
sed
-r
's,/$,,'
`
"
srcdir
=
"
$(
echo
$src
|
sed
-r
's,/$,,'
)
"
else
case
"
$src
"
in
http://
*
|
ftp://
*
)
srcurl
=
"
$src
"
;;
...
...
setup-dns.in
View file @
07c02f67
...
...
@@ -31,8 +31,8 @@ shift $(($OPTIND - 1))
conf
=
"
${
ROOT
}
etc/resolv.conf"
if
[
-f
"
$conf
"
]
;
then
domain
=
`
awk
'/^domain/ {print $2}'
$conf
`
dns
=
`
awk
'/^nameserver/ {print $2}'
$conf
`
domain
=
$(
awk
'/^domain/ {print $2}'
$conf
)
dns
=
$(
awk
'/^nameserver/ {print $2}'
$conf
)
fi
if
[
-n
"
$DOMAINNAME
"
]
;
then
...
...
setup-hostname.in
View file @
07c02f67
...
...
@@ -57,7 +57,7 @@ fi
HOST
=
"
$name
"
while
[
-z
"
$name
"
]
;
do
HOST
=
`
hostname
`
HOST
=
$(
hostname
)
echon
"Enter system hostname (short form, e.g. 'foo') [
$HOST
]: "
default_read HOST
"
$HOST
"
if
valid_hostname
"
$HOST
"
;
then
...
...
setup-interfaces.in
View file @
07c02f67
...
...
@@ -190,7 +190,7 @@ config_iface() {
done
if
[
"
$resp
"
=
"yes"
]
;
then
bridge
=
"br
"
`
echo
$iface
|
sed
's/[^0-9]//g'
`
bridge
=
"br
$(
echo
$iface
|
sed
's/[^0-9]//g'
)
"
ask
"Name of the bridge you want add
$iface
to:"
$bridge
bridge_add_port
$resp
$iface
return
...
...
@@ -261,7 +261,7 @@ config_iface() {
# use ipcalc -m to validate netmask. we dont accept <addr>/mask suffix
# so we pass on a dummy mask to ipcalc.
while
!
ipcalc
-s
-m
$netmask
/0
>
/dev/null 2>&1
;
do
netmask
=
`
get_default_mask
$address
`
netmask
=
$(
get_default_mask
$address
)
ask
"Netmask?"
$netmask
netmask
=
$resp
[
"
$netmask
"
=
"abort"
]
&&
return
...
...
@@ -270,7 +270,7 @@ config_iface() {
# use ipcalc -m to validate netmask. we dont accept <addr>/mask suffix
# so we pass on a dummy mask to ipcalc.
while
!
ipcalc
-s
-m
$gateway
/0
>
/dev/null 2>&1
;
do
gateway
=
`
get_default_gateway
$iface
`
gateway
=
$(
get_default_gateway
$iface
)
[
-z
"
$gateway
"
]
&&
gateway
=
none
ask
"Gateway? (or 'none')"
$gateway
gateway
=
$resp
...
...
@@ -480,7 +480,7 @@ prompt_for_interfaces() {
hostname
=
$(
cat
$ROOT
/etc/hostname 2>/dev/null
)
for
i
in
*
.conf
;
do
iface
=
`
basename
$i
.conf
`
iface
=
$(
basename
$i
.conf
)
iface
=
${
iface
#[0-9]*~
}
bridge_ports
=
bond_slaves
=
...
...
update-conf.in
View file @
07c02f67
...
...
@@ -26,7 +26,7 @@ __EOF__
is_modified
()
{
[
-f
"
$LBUCACHE
"
]
||
lbu status
-a
|
awk
'{print $2}'
>
"
$LBUCACHE
"
test
-n
"
`
(
echo
\"
$1
\"
;
cat
\"
$LBUCACHE
\"
)
|
sort
|
uniq
-d
`
"
test
-n
"
$(
(
echo
\"
$1
\"
;
cat
\"
$LBUCACHE
\"
)
|
sort
|
uniq
-d
)
"
}
...
...
@@ -34,7 +34,7 @@ is_initd() {
echo
"
$1
"
|
grep
etc/init.d/
>
/dev/null
}
args
=
`
getopt
-o
ailh
--long
all,initd,list,help
-n
"
$PROGRAM
"
--
"
$@
"
`
args
=
$(
getopt
-o
ailh
--long
all,initd,list,help
-n
"
$PROGRAM
"
--
"
$@
"
)
if
[
$?
-ne
0
]
;
then
usage
exit
2
...
...
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