Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
backupninja
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Custom issue tracker
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Model registry
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Liberate
backupninja
Commits
ddce1197
Commit
ddce1197
authored
16 years ago
by
intrigeri
Browse files
Options
Downloads
Patches
Plain Diff
sys: make debconf-get-selections detection on VServers really more robust
parent
edeb50c7
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
handlers/sys.in
+11
-2
11 additions, 2 deletions
handlers/sys.in
with
11 additions
and
2 deletions
handlers/sys.in
+
11
−
2
View file @
ddce1197
...
...
@@ -116,7 +116,7 @@ if [ "$packages" == "yes" ]; then
continue
fi
# is $packagemgr available inside $vserver ?
if
[
!
-x
"
$VROOTDIR
/
$vserver
`
$VSERVER
$vserver
exec
which
$
packagemgr
`
"
]
;
then
if
[
!
-x
"
$
{
VROOTDIR
}
/
$
{
vserver
}${
packagemgr
}
"
]
;
then
warning
"can't find
$packagemgr
in vserver
$vserver
, skipping installed packages report."
else
# don't expand * since it can be used in $packagemgroptions
...
...
@@ -126,12 +126,21 @@ if [ "$packages" == "yes" ]; then
set
+o noglob
fi
# is $debconfgetselections available inside $vserver ?
if
[
-z
"
`
$VSERVER
$vserver
exec
which debconf-get-selections
`
"
]
;
then
found
=
no
# case #1: it is available on the host, is it available inside $vserver ?
if
[
-n
"
$debconfgetselections
"
]
;
then
[
-x
"
${
VROOTDIR
}
/
${
vserver
}${
debconfgetselections
}
"
]
&&
found
=
yes
# case #2: it is not available on the host, is it available inside $vserver ?
else
[
-n
"
`
$VSERVER
$vserver
exec
which debconf-get-selections
`
"
]
&&
found
=
yes
fi
if
[
"
$found
"
!=
yes
]
;
then
warning
"can't find debconf-get-selections in vserver
$vserver
, skipping package selection states."
else
debug
"
$VSERVER
$vserver
exec
$debconfgetselections
>
$VROOTDIR
/
$vserver$selectionsfile
"
$VSERVER
$vserver
exec
$debconfgetselections
>
$VROOTDIR
/
$vserver$selectionsfile
||
fatal
"can not save debconf-get-selections info to
$selectionsfile
"
fi
unset
found
done
fi
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
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!
Save comment
Cancel
Please
register
or
sign in
to comment