summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoshua Harlow <harlowja@yahoo-inc.com>2012-06-28 15:41:54 -0700
committerJoshua Harlow <harlowja@yahoo-inc.com>2012-06-28 15:41:54 -0700
commit27b0c2d6f19f83b453fec37e9f55f6c9513e1ce0 (patch)
tree5375cf2104fe41732122a6efbda6b4e879ef9dc1
parenta21edaa44a754de813df1bada063e25d5e8dfa08 (diff)
downloadvyos-cloud-init-27b0c2d6f19f83b453fec37e9f55f6c9513e1ce0.tar.gz
vyos-cloud-init-27b0c2d6f19f83b453fec37e9f55f6c9513e1ce0.zip
1. Match the variable names with what they are used for
2. Create a set of directories that need to be kept for the different boot modes.
-rwxr-xr-xpackages/brpm27
1 files changed, 25 insertions, 2 deletions
diff --git a/packages/brpm b/packages/brpm
index 51242e54..d2ff06f0 100755
--- a/packages/brpm
+++ b/packages/brpm
@@ -162,7 +162,7 @@ def generate_spec_contents(args, tmpl_fn):
# Since setup.py installs them all, we need to selectively
# remove the wrong ones and ensure the right one/s are kept
# for the boot mode that is desired...
- post_remove = {
+ boot_remove = {
'initd': [
'/etc/init.d/cloud-init-local',
'/etc/systemd/',
@@ -186,8 +186,31 @@ def generate_spec_contents(args, tmpl_fn):
'/etc/init/',
'/etc/systemd/',
],
+ 'upstart-local': [
+ '/etc/init/cloud-init.conf',
+ '/etc/init/',
+ '/etc/systemd/',
+ ]
}
- subs['post_remove'] = post_remove[args.boot]
+ boot_keep = [
+ 'systemd': [
+ '/etc/systemd/*',
+ ],
+ 'upstart': [
+ '/etc/init/*',
+ ],
+ 'upstart-local': [
+ '/etc/init/*',
+ ],
+ 'initd-local': [
+ '/etc/init.d/*',
+ ],
+ 'initd': [
+ '/etc/init.d/*',
+ ],
+ ]
+ subs['post_remove'] = boot_remove[args.boot]
+ other_files.extend(boot_keep[args.boot]
subs['files'] = other_files
return templater.render_from_file(tmpl_fn, params=subs)