~alpine/devel

main/postgresql/pg-restore.initd v1 PROPOSED

Nathan Angelacos: 1
 	main/postgresql/pg-restore.initd

 1 files changed, 8 insertions(+), 1 deletions(-)
Export patchset (mbox)
How do I use this?

Copy & paste the following snippet into your terminal to import this patchset into git:

curl -s https://lists.alpinelinux.org/~alpine/devel/patches/102/mbox | git am -3
Learn more about email & git

[alpine-devel] [PATCH] main/postgresql/pg-restore.initd Export this patch

From: Nathan Angelacos <nangel@tetrasec.net>

	add a "purge" command - delete the temporary database backup
---
 main/postgresql/pg-restore.initd |    9 ++++++++-
 1 files changed, 8 insertions(+), 1 deletions(-)

diff --git a/main/postgresql/pg-restore.initd b/main/postgresql/pg-restore.initd
index 91c69d1..13462fe 100644
--- a/main/postgresql/pg-restore.initd
+++ b/main/postgresql/pg-restore.initd
@@ -2,7 +2,7 @@

. /etc/conf.d/postgresql

opts="${opts} dump restore"
opts="${opts} dump restore purge"

depend() {
	need postgresql
@@ -27,6 +27,13 @@ dump() {
	eend $?
}

purge() {
	yesno "$PGDUMP" && return 0
	ebegin "Removing temporary $PGDUMP PostgreSQL backup"
	rm -f "$PGDUMP" 
	eend $?
}

start() {
	restore	
}
-- 
1.7.6



---
Unsubscribe:  alpine-devel+unsubscribe@lists.alpinelinux.org
Help:         alpine-devel+help@lists.alpinelinux.org
---
On 08/15/2011 06:16 AM, Nathan Angelacos wrote:
 > From: Nathan Angelacos<nangel@tetrasec.net>
 >
 > 	add a "purge" command - delete the temporary database backup

The idea here is to delete the temporary database dump after an lbu 
commit has completed:


-- /etc/lbu/pre-package.d/postgresdump  --
#!/bin/sh
/etc/init.d/pg-restore dump


-- /etc/lbu/post-package.d/postgresdump  --
#!/bin/sh
/etc/init.d/pg-restore purge


Otherwise the temporary file is never removed.


---
Unsubscribe:  alpine-devel+unsubscribe@lists.alpinelinux.org
Help:         alpine-devel+help@lists.alpinelinux.org
---