Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Petr Štetiar
jenkins.debian.net
Commits
0316d461
Commit
0316d461
authored
Nov 04, 2019
by
Vagrant Cascadian
Committed by
Vagrant Cascadian
Nov 04, 2019
Browse files
reproducible: Ensure authorized_keys are processed in the correct
directory regardless of where it is run from.
parent
620fa54d
Changes
1
Hide whitespace changes
Inline
Side-by-side
update_jdn.sh
View file @
0316d461
...
@@ -133,7 +133,8 @@ u_shell['jenkins-adm']='/bin/bash'
...
@@ -133,7 +133,8 @@ u_shell['jenkins-adm']='/bin/bash'
# get the users out of the user_host_groups array's index
# get the users out of the user_host_groups array's index
users
=
$(
for
i
in
${
!user_host_groups[@]
}
;
do
echo
${
i
%,*
}
;
done
|
sort
-u
)
users
=
$(
for
i
in
${
!user_host_groups[@]
}
;
do
echo
${
i
%,*
}
;
done
|
sort
-u
)
(
$UP2DATE
&&
[
-z
"
$(
find authorized_keys
-newer
$0
)
"
]
)
||
for
user
in
${
users
}
;
do
(
$UP2DATE
&&
[
-z
"
$(
find
$BASEDIR
/authorized_keys
-newer
$0
)
"
]
)
||
for
user
in
${
users
}
;
do
cd
$BASEDIR
# -v is a bashism to check for set variables, used here to see if this user is active on this host
# -v is a bashism to check for set variables, used here to see if this user is active on this host
if
[
!
-v
user_host_groups[
"
$user
"
,
"
$HOSTNAME
"
]
]
&&
[
!
-v
user_host_groups[
"
$user
"
,
'*'
]
]
&&
[
!
-v
user_host_groups[
"
$user
"
,
"
$DPKG_ARCH
"
]
]
;
then
if
[
!
-v
user_host_groups[
"
$user
"
,
"
$HOSTNAME
"
]
]
&&
[
!
-v
user_host_groups[
"
$user
"
,
'*'
]
]
&&
[
!
-v
user_host_groups[
"
$user
"
,
"
$DPKG_ARCH
"
]
]
;
then
continue
continue
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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