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
1e572a66
Commit
1e572a66
authored
Jan 13, 2010
by
Vitaly Lipatov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
loginhsh: add -o option for run as root
parent
98fae9bc
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
4 deletions
+6
-4
loginhsh
bin/loginhsh
+6
-4
No files found.
bin/loginhsh
View file @
1e572a66
...
...
@@ -18,7 +18,7 @@ SAVEOPT=$@
#############################
Usage
=
"Usage:
$name
[-t -i -h -r] [-
$CURRENTBRANCHNAME
] bin.rpm..."
Usage
=
"Usage:
$name
[-t -i -h -r
-c
] [-
$CURRENTBRANCHNAME
] bin.rpm..."
function
mygetopts
()
{
name
=
${
0
##*/
}
...
...
@@ -31,18 +31,20 @@ phelp()
echog
"Options:"
echog
" -i - initialize hasher"
echog
" -c - cleanup hasher"
echog
" -o - log in as root user"
echog
" -t - use test hasher dir"
echog
" -r - remote login to hasher"
echog
" -M?? - branch name"
}
while
getopts
:chit
r
opt
;
do
while
getopts
:chit
o
opt
;
do
case
$opt
in
h
)
phelp
;
exit
0
;;
t
)
HASHERDIR
=
$HASHERDIR
-test
;
TESTMODE
=
1
;;
i
)
INITIALIZE
=
1
;;
c
)
CLEANUP
=
1
;;
r
)
REMOTE
=
1
;;
o
)
ROOTER
=
"--rooter"
;;
+?
)
echog
"
$name
: options should not be preceded by a '+'."
1>&2
;
exit
2
;;
# ?) echog "$name: $OPTARG: bad option. Use -h for help." 1>&2 ; exit 2;;
?
)
OPTIND
=
$((
OPTIND-1
))
;
break
;
...
...
@@ -70,7 +72,7 @@ fi
# export OURAPTCONF with temp. file contains correct path to sources.list
prepare_aptconfig
HASHERARG
=
"--apt-config=
$OURAPTCONF
--target
$DEFAULTARCH
"
HASHERARG
=
"
$HASHERARG
--apt-config=
$OURAPTCONF
--target
$DEFAULTARCH
"
mygetopts
$LISTARGS
...
...
@@ -107,7 +109,7 @@ else
fi
$HSH
-install
$HASHERDIR
--wait-lock
$UTILPKG
$LISTRPMARGS
$LISTNAMES
||
fatal
"Error with install"
echog
"You are in hasher shell"
$HSH
-shell
$HASHERDIR
$SHELLHASHERARG
-Y
--shell
$HSH
-shell
$HASHERDIR
$SHELLHASHERARG
$ROOTER
-Y
--shell
if
[
-n
"
$TESTMODE
"
]
;
then
echo
"Remove package for test preun scripts"
$HSH
-run
--rooter
$HASHERDIR
--
rpm
-e
$(
drop_pkg_extensions
$LISTNAMES
)
...
...
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