File tree Expand file tree Collapse file tree
tools/appliance/definitions/systemvmtemplate Expand file tree Collapse file tree Original file line number Diff line number Diff line change 9191
9292fix_inittab () {
9393 # Fix inittab
94- cat >> etc/inittab << EOF
94+ cat >> / etc/inittab << EOF
9595
9696vc:2345:respawn:/sbin/getty 38400 hvc0
9797EOF
9898}
9999
100100fix_acpid () {
101101 # Fix acpid
102- mkdir -p etc/acpi/events
103- cat >> etc/acpi/events/power << EOF
102+ mkdir -p / etc/acpi/events
103+ cat >> / etc/acpi/events/power << EOF
104104event=button/power.*
105105action=/usr/local/sbin/power.sh "%e"
106106EOF
107- cat >> usr/local/sbin/power.sh << EOF
107+ cat >> / usr/local/sbin/power.sh << EOF
108108#!/bin/bash
109109/sbin/poweroff
110110EOF
111- chmod a+x usr/local/sbin/power.sh
111+ chmod a+x / usr/local/sbin/power.sh
112112}
113113
114114fix_hostname () {
@@ -149,8 +149,8 @@ configure_services() {
149149
150150 # Get config files from master
151151 snapshot_url=" https://git-wip-us.apache.org/repos/asf?p=incubator-cloudstack.git;a=snapshot;h=HEAD;sf=tgz"
152- snapshot_dir=" /tmp /incubator-cloudstack*"
153- cd /tmp
152+ snapshot_dir=" /opt /incubator-cloudstack*"
153+ cd /opt
154154 wget $snapshot_url -O cloudstack.tar.gz
155155 tar -zxvf cloudstack.tar.gz
156156 cp -rv $snapshot_dir /patches/systemvm/debian/config/* /
Original file line number Diff line number Diff line change 1- # clean up stuff copied in by veewee
1+ # Clean up stuff copied in by veewee
22rm -f /root/*
33
44# Zero out the free space to save space in the final image:
5- dd if=/dev/zero of=/EMPTY bs=1M
6- sync
7- rm -f /EMPTY
8-
5+ for path in / /boot /usr /var /opt /tmp
6+ do
7+ dd if=/dev/zero of=$path /zero bs=1M
8+ sync
9+ rm -f $i /zero
10+ done
You can’t perform that action at this time.
0 commit comments