diff options
author | Jeka Der <jekader@gmail.com> | 2014-10-13 20:12:43 +0200 |
---|---|---|
committer | Jeka Der <jekader@gmail.com> | 2014-10-13 20:12:43 +0200 |
commit | 6ecf2cdb10a375d5fdad5f81ed183e6184e5f58d (patch) | |
tree | 866aa0e4eb82492adb2b4480f6794d3b142920b1 | |
parent | 60c9d2636e87123c5762c934120b077513bbd442 (diff) | |
download | fake_ilo-6ecf2cdb10a375d5fdad5f81ed183e6184e5f58d.tar.gz |
updated build scripts
-rw-r--r-- | Makefile | 6 | ||||
-rw-r--r-- | README.md | 13 | ||||
-rw-r--r-- | debian/changelog | 6 | ||||
-rw-r--r-- | debian/control | 2 | ||||
-rw-r--r-- | debian/postinst | 14 | ||||
-rw-r--r-- | debian/postrm | 3 | ||||
-rw-r--r-- | debian/prerm | 3 | ||||
-rwxr-xr-x | debian/rules | 1 | ||||
-rw-r--r-- | fake_ilo | 2 |
9 files changed, 35 insertions, 15 deletions
@@ -3,15 +3,15 @@ sysconfdir=$(DESTDIR)/etc all: # openssl req -x509 -newkey rsa:2048 -keyout $(sysconfdir)/server.key -out $(sysconfdir)/server.crt -nodes -days 9999 -subj "/C=MD/ST=Chisinau/L=Chisinau/O=IT/CN=www.example.com" - openssl req -x509 -newkey rsa:2048 -keyout server.key -out server.crt -nodes -days 9999 -subj "/C=MD/ST=Chisinau/L=Chisinau/O=IT/CN=www.example.com" +# openssl req -x509 -newkey rsa:2048 -keyout server.key -out server.crt -nodes -days 9999 -subj "/C=MD/ST=Chisinau/L=Chisinau/O=IT/CN=www.example.com" echo "Nothing to compile, please run make install" install: all # env mkdir -p $(sysconfdir)/fake_ilo/ install -m 0755 ilo.py $(bindir) install -m 0755 fake_ilo $(sysconfdir)/init.d/ - install -m 0600 server.key $(sysconfdir)/fake_ilo/ - install -m 0600 server.crt $(sysconfdir)/fake_ilo/ +# install -m 0600 server.key $(sysconfdir)/fake_ilo/ +# install -m 0600 server.crt $(sysconfdir)/fake_ilo/ clean: rm -f server.key @@ -59,20 +59,13 @@ b) manually: `$ sudo make install` -ENABLE: -------- - -register the init script (Debian): +3. register the init script (Debian): `update-rc.d fake_ilo enable` +4. Create certificate and key. Data provided in the requested fields is not important: oVirt does not verify certificates: -CUSTOM CERTIFICATE: -------------------- - -The install script creates a default certificate which should be enough for testing. To replace it, follwo the steps: - -1. go into the config directory and generate a self-signed certificate by running this command. Data provided in the requested fields is not important: oVirt does not verify certificates: + `# mkdir /etc/fake_ilo/` `# cd /etc/fake_ilo/` diff --git a/debian/changelog b/debian/changelog index 97b5597..32bd213 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,9 @@ +fake-ilo (0.0.1-4) UNRELEASED; urgency=medium + + * Updated init scripts and installer + + -- Jeka Der <jekader@gmail.com> Mon, 13 Oct 2014 19:55:00 +0200 + fake-ilo (0.0.1-1) UNRELEASED; urgency=medium * Initial release. diff --git a/debian/control b/debian/control index fd6e0b8..9458602 100644 --- a/debian/control +++ b/debian/control @@ -7,7 +7,7 @@ Build-Depends: debhelper (>= 9), openssl, python Package: fake-ilo Architecture: any -Depends: openssl, python, libvirt +Depends: openssl, python, libvirt-daemon Description: iLO emulator iLO emulator which can power cycle libvirt VMs. It was written by me to perform tests of oVirt/RHEV Power Management features by installing hosts as libvirt diff --git a/debian/postinst b/debian/postinst new file mode 100644 index 0000000..485edae --- /dev/null +++ b/debian/postinst @@ -0,0 +1,14 @@ +#!/bin/bash + +# generate certificates if absent +if [ ! -f "/etc/fake_ilo/server.crt" ]; then + if [ ! -f "/etc/fake_ilo/server.key" ]; then + mkdir /etc/fake_ilo/ + echo "Creating certificates" + openssl req -x509 -newkey rsa:2048 -keyout /etc/fake_ilo/server.key -out /etc/fake_ilo/server.crt -nodes -days 9999 -subj "/C=MD/ST=Chisinau/L=Chisinau/O=IT/CN=$(hostname -f)" + fi +fi + +# enable the init script +update-rc.d -f fake_ilo defaults +invoke-rc.d fake_ilo start diff --git a/debian/postrm b/debian/postrm new file mode 100644 index 0000000..01c4275 --- /dev/null +++ b/debian/postrm @@ -0,0 +1,3 @@ +#!/bin/sh + +update-rc.d -f fake_ilo remove diff --git a/debian/prerm b/debian/prerm new file mode 100644 index 0000000..b3cd3ca --- /dev/null +++ b/debian/prerm @@ -0,0 +1,3 @@ +#!/bin/sh + +invoke-rc.d fake_ilo stop diff --git a/debian/rules b/debian/rules index 4f2c774..cbe925d 100755 --- a/debian/rules +++ b/debian/rules @@ -1,4 +1,3 @@ #!/usr/bin/make -f %: dh $@ - @@ -12,6 +12,8 @@ set -e +# . /lib/lsb/init-functions + PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin DAEMON=/usr/bin/ilo.py NAME=fake_ilo |