summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEudyptula <eitan@mosenkis.net>2009-08-27 12:28:37 -0400
committerEudyptula <eitan@mosenkis.net>2009-08-27 12:28:37 -0400
commit7fc74f6ed6a776aedbf8a9ce6ab3f5e40b10a98d (patch)
tree54a43a4d2c0dd07768e0f804d6e2f7f1be37e374 /backend
parentFix builds->bundle() to use bundle column, not look in buildopts for bundler (diff)
downloadingenue-7fc74f6ed6a776aedbf8a9ce6ab3f5e40b10a98d.tar.gz
ingenue-7fc74f6ed6a776aedbf8a9ce6ab3f5e40b10a98d.tar.bz2
ingenue-7fc74f6ed6a776aedbf8a9ce6ab3f5e40b10a98d.zip
Fix two bugs with gentoo_portage/init.d.php; update some comments in sql_row_obj
Diffstat (limited to 'backend')
-rw-r--r--backend/modules/gentoo_portage/build.php2
-rw-r--r--backend/modules/gentoo_portage/init.d.php12
2 files changed, 8 insertions, 6 deletions
diff --git a/backend/modules/gentoo_portage/build.php b/backend/modules/gentoo_portage/build.php
index 2d2f32f..e930001 100644
--- a/backend/modules/gentoo_portage/build.php
+++ b/backend/modules/gentoo_portage/build.php
@@ -11,7 +11,7 @@ $extra=explode(' ', $opts['options']);
if (in_array('portage', $extra))
add_step('portage');
if (in_array('prune_init', $extra))
- add_step('init.d.php');
+ add_step('init.d');
if (in_array('timezone', $extra))
add_step('timezone');
if (in_array('hostname', $extra))
diff --git a/backend/modules/gentoo_portage/init.d.php b/backend/modules/gentoo_portage/init.d.php
index 9ab61e6..5d4f499 100644
--- a/backend/modules/gentoo_portage/init.d.php
+++ b/backend/modules/gentoo_portage/init.d.php
@@ -1,8 +1,10 @@
<?php
-start_internal_task('Remove unwanted init scripts');
-foreach (explode(' ', $opts['pruneinit']) as $init) {
- list($name, $runlevel)=explode(':', $init, 2);
- log_status("$name ($runlevel)", unlink("$imagedir/etc/runlevels/$runlevel/$name"));
+if (isset($opts['pruneinit']) && strlen(trim($opts['pruneinit'])) > 0) {
+ start_internal_task('Remove unwanted init scripts');
+ foreach (explode(' ', $opts['pruneinit']) as $init) {
+ list($name, $runlevel)=explode(':', $init, 2);
+ log_status("$name ($runlevel)", unlink("$imagedir/etc/runlevels/$runlevel/$name"));
+ }
+ end_internal_task(0);
}
-end_internal_task(0);
?>