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
3a88b631
Commit
3a88b631
authored
Oct 20, 2020
by
Vitaly Lipatov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
loginhsh: enable network by default
parent
49e92c1d
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
13 additions
and
6 deletions
+13
-6
loginhsh
bin/loginhsh
+12
-5
runinhsh
bin/runinhsh
+1
-1
No files found.
bin/loginhsh
View file @
3a88b631
...
...
@@ -42,11 +42,11 @@ phelp()
echog
"Extra options:"
echog
" -d print hasher dir only"
echog
" -s do not install stuffs (extra packages)"
echog
" -M?? binary repository name (obsoleted)"
echog
" -x allow run X program (obsoleted)"
echog
" -n disable network"
}
while
getopts
:chitodvqr:b:p:sxXY opt
;
do
SHARENETWORK
=
"1"
while
getopts
:chitondvqr:b:p:sXY opt
;
do
case
$opt
in
h
)
phelp
;
exit
0
;;
t
)
TESTMODE
=
1
;;
...
...
@@ -57,10 +57,10 @@ while getopts :chitodvqr:b:p:sxXY opt; do
b
)
BINARYREPONAME
=
"
$OPTARG
"
;;
r
)
RUNCOMMAND
=
"
$OPTARG
"
;;
p
)
HASHERPOSTFIX
=
"
$OPTARG
"
;;
n
)
SHARENETWORK
=
""
;;
s
)
SKIPSTUFFS
=
s
;;
X
)
ALLOWX
=
-X
;;
Y
)
ALLOWX
=
-Y
;;
x
)
ALLOWX
=
-Y
;;
v
)
VERBOSE
=
"-v"
;;
o
)
ROOTER
=
"--rooter"
;;
+?
)
echog
"
$name
: options should not be preceded by a '+'."
1>&2
;
exit
2
;;
...
...
@@ -117,10 +117,12 @@ if [ ! -d $HASHERDIR ] || [ "$INITIALIZE" = "1" ] ; then
docmd
$HSH
$VERBOSE
$HASHERARG
--initroot-only
$HASHERDIR
||
fatal
"Cannot initialize hasher"
fi
SHELLHASHERARG
=
"--mountpoints=/proc"
SHELLHASHERARG
=
"--mountpoints=/proc
,/dev/shm
"
check_locking
[
-n
"
$SHARENETWORK
"
]
&&
export
share_network
=
1
UTILPKG
=
''
if
[
-n
"
$QUIETMODE
"
]
;
then
...
...
@@ -165,5 +167,10 @@ if [ -n "$RUNCOMMAND" ] ; then
exit
fi
if
[
-n
"
$SHARENETWORK
"
]
;
then
$HSH
-run
$HASHERDIR
--rooter
--
sh
-c
'cat >/etc/resolv.conf'
</etc/resolv.conf
fi
echog
"You are in hasher shell"
docmd
$HSH
-shell
$HASHERDIR
$SHELLHASHERARG
$ROOTER
--wait-lock
--shell
bin/runinhsh
View file @
3a88b631
...
...
@@ -70,4 +70,4 @@ esac
HASHERNAME
=
$(
echo
"
$COMMAND
$PACKAGES
"
|
md5sum
)
showcmd
$ETERBUILDBIN
/loginhsh
-Y
-t
-p
$HASHERNAME
$PLATFORM
-r
"
$COMMAND
$OPTIONS
"
$PACKAGES
share_network
=
1
$ETERBUILDBIN
/loginhsh
-Y
-t
-p
$HASHERNAME
$PLATFORM
-r
"
$COMMAND
$OPTIONS
"
$PACKAGES
$ETERBUILDBIN
/loginhsh
-Y
-t
-p
$HASHERNAME
$PLATFORM
-r
"
$COMMAND
$OPTIONS
"
$PACKAGES
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