diff options
author | Jeka Der <jekader@gmail.com> | 2014-10-12 20:00:11 +0200 |
---|---|---|
committer | Jeka Der <jekader@gmail.com> | 2014-10-12 20:00:11 +0200 |
commit | ed13a59665f6c2ebdff6c18251ffa661c2367eb4 (patch) | |
tree | 63375011a338cf83d465019eaa8a11e956818d7d | |
parent | b5f2555c2027d3e39e7b0b2bc5bf2d1a9880efcb (diff) | |
download | fake_ilo-ed13a59665f6c2ebdff6c18251ffa661c2367eb4.tar.gz |
fixed makefile, updated README
-rw-r--r-- | Makefile | 20 | ||||
-rw-r--r-- | README.md | 47 | ||||
-rw-r--r-- | fake_ilo | 2 |
3 files changed, 56 insertions, 13 deletions
@@ -1,6 +1,18 @@ +bindir=$(DESTDIR)/usr/bin +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" echo "Nothing to compile, please run make install" -install: - mkdir -p /etc/fake_ilo/ - 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=www.example.com" - cp ilo.py /usr/local/bin/ +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/ + +clean: + rm -f server.key + rm -f server.crt @@ -25,20 +25,51 @@ This script was made for testing purposes only with no security in mind. The qua INSTALL: -------- -1. copy ilo.py to /usr/local/bin/ and make it executable -2. copy fake_ilo to /etc/init.d/ and make it executable -3. create configuration directory: +a) as .deb file: - `# mkdir /etc/fake_ilo/` +1. install dependencies: + `$ sudo apt-get install git devscripts debhelper make` -4. 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: +2. fetch the source and build the package: - `# cd /etc/fake_ilo/` + `$ git clone https://github.com/jekader/fake_ilo.git` + `$ tar -cjf fake-ilo_0.0.1.orig.tar.bz2 fake_ilo/` + `$ cd fake_ilo` + `$ debuild -us -uc` - `# openssl req -x509 -newkey rsa:2048 -keyout server.key -out server.crt -nodes -days 9999` -5. register the init script (Debian): +3. install the resulting .deb + `$ sudo dpkg -i ../fake-ilo_0.0.1-1_amd64.deb` + +b) manually: + +1. install dependencies: + `$ sudo apt-get install git make` + +2. fetch the source and build the package: + + `$ git clone https://github.com/jekader/fake_ilo.git` + `$ cd fake_ilo` + `$ make` + `$ sudo make install` + +ENABLE: +------- + +register the init script (Debian): `update-rc.d fake_ilo enable` + + +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: + + `# cd /etc/fake_ilo/` + + `# openssl req -x509 -newkey rsa:2048 -keyout server.key -out server.crt -nodes -days 9999` USAGE: ------ @@ -13,7 +13,7 @@ set -e PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin -DAEMON=/usr/local/bin/ilo.py +DAEMON=/usr/bin/ilo.py NAME=fake_ilo DESC="iLO emulator" |