Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
E
etersoft-build-utils
Project
Project
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
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
korinf
etersoft-build-utils
Commits
df71e864
Commit
df71e864
authored
Feb 14, 2010
by
Vitaly Lipatov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
rewrite check_locking according to new hasher locking method
parent
7f9f8303
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
19 additions
and
13 deletions
+19
-13
hasher
share/eterbuild/functions/hasher
+19
-13
No files found.
share/eterbuild/functions/hasher
View file @
df71e864
#!/bin/bash
# 2008 Etersoft www.etersoft.ru
# 2008
, 2010
Etersoft www.etersoft.ru
# Author: Vitaly Lipatov <lav@etersoft.ru>
# Public domain
.
$ETERBUILDDIR
/functions/
rpm
load_mod
rpm
check_locking
()
{
if
[
-f
$HASHERDIR
/lockdir/lockfile
]
then
echo
echog
"Hasher
$HASHERDIR
in use at
`
date
`
"
echo
-n
"Wait for unlocking"
while
test
-f
$HASHERDIR
/lockdir/lockfile
do
echo
-n
"."
sleep
$((
$RANDOM
%
5
+
3
))
done
echo
test
-f
"
$HASHERDIR
/pid"
||
return
local
pid
=
"
$(
cat
"
$HASHERDIR
/pid"
)
"
if
[
"
$pid
"
-gt
0
]
;
then
if
kill
-0
--
"
$pid
"
2>/dev/null
;
then
warning
"hasher dir
$HASHERDIR
is already locked by pid
$pid
"
ps hp
"
$pid
"
>
&2
else
warning
"hasher dir
$HASHERDIR
is locked by stale pid
$pid
"
fi
fi
# echo -n "Wait for unlocking"
# while test -f $HASHERDIR/lockdir/lockfile
# do
# echo -n "."
# sleep $(($RANDOM%5+3))
# done
}
# workaround about hard coded path to sources.list in apt.conf
...
...
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