Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
alpine-conf
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
19
Issues
19
List
Boards
Labels
Service Desk
Milestones
Merge Requests
2
Merge Requests
2
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
alpine
alpine-conf
Commits
7840f2d8
Commit
7840f2d8
authored
Sep 29, 2009
by
Natanael Copa
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
lbu: try handle full media
try avoid ending up with a lbu media without any apkovl.
parent
5572e8a3
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
18 additions
and
3 deletions
+18
-3
lbu.in
lbu.in
+18
-3
No files found.
lbu.in
View file @
7840f2d8
...
...
@@ -75,9 +75,18 @@ backup_apkovl() {
vecho
"Creating backup $backup"
if
[
-
z
"$DRYRUN"
];
then
mv
"$outfile"
"$backup"
APKOVL_BACKUP
=
"$backup"
fi
}
restore_apkovl
()
{
local
outfile
=
"$1"
if
[
-
n
"$DRYRUN"
]
||
[
-
z
"$APKOVL_BACKUP"
];
then
return
0
fi
mv
"$APKOVL_BACKUP"
"$outfile"
}
#
verify
we
have
openssl
if
we
want
to
encrypt
check_openssl
()
{
[
-
z
"$ENCRYPTION"
]
&&
return
0
...
...
@@ -274,10 +283,16 @@ cmd_package() {
if
[
"x$pkg"
=
"x-"
];
then
cat
"$tmppkg"
else
cp
"$tmppkg"
"$pkg"
if
cp
"$tmppkg"
"$pkg.new"
;
then
mv
"$pkg.new"
"$pkg"
rc
=$?
else
rm
-
f
"$pkg.new"
rc
=
1
fi
fi
fi
vecho
"Created $pkg"
[
$
rc
-
eq
0
]
&&
vecho
"Created $pkg"
fi
return
$
rc
}
...
...
@@ -354,7 +369,6 @@ cmd_commit() {
outfile
=
"$outfile.$ENCRYPTION"
fi
#
remove
old
config
files
if
[
-
n
"$DELETEOLDCONFIGS"
]
;
then
local
rmfiles
=$(
ls
"$mnt/"
*.
apkovl
.
tar
.
gz
*
2
>/
dev
/
null
)
...
...
@@ -382,6 +396,7 @@ cmd_commit() {
#
create
package
if
! cmd_package "$outfile"; then
restore_apkovl
"$outfile"
cleanup
die
"Problems creating archive. aborting"
fi
...
...
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