aboutsummaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorCem Keylan <cem@ckyln.com>2019-12-27 10:52:08 +0300
committerCem Keylan <cem@ckyln.com>2019-12-27 10:52:08 +0300
commit48d1cd53ed0e50e0be99a2a620ccdddf020d26a0 (patch)
tree7a0cd09d86e514c9d59ebc3f952aa10d63fc8c17 /Makefile
parent54d7bde90161b3e01a5e15260d08e79f39096fec (diff)
downloadinit-48d1cd53ed0e50e0be99a2a620ccdddf020d26a0.tar.gz
change inittab according to prefix
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile14
1 files changed, 8 insertions, 6 deletions
diff --git a/Makefile b/Makefile
index 41eacf1..4efb010 100644
--- a/Makefile
+++ b/Makefile
@@ -3,12 +3,14 @@
PREFIX=/usr
install:
- @install -Dm644 inittab ${DESTDIR}/etc/inittab
- @install -Dm755 rc.boot ${DESTDIR}${PREFIX}/lib/init/rc.boot
- @install -Dm755 rc.shutdown ${DESTDIR}${PREFIX}/lib/init/rc.shutdown
+ mkdir -p ${DESTDIR}/etc
+ sed 's#PREFIX#{PREFIX}#g' < inittab > ${DESTDIR}/etc/inittab
+ chmod 644 ${DESTDIR}/etc/inittab
+ install -Dm755 rc.boot ${DESTDIR}${PREFIX}/lib/init/rc.boot
+ install -Dm755 rc.shutdown ${DESTDIR}${PREFIX}/lib/init/rc.shutdown
uninstall:
- @rm -f ${DESTDIR}/etc/inittab
- @rm -f ${DESTDIR}${PREFIX}/lib/init/rc.boot
- @rm -f ${DESTDIR}${PREFIX}/lib/init/rc.shutdown
+ rm -f ${DESTDIR}/etc/inittab
+ rm -f ${DESTDIR}${PREFIX}/lib/init/rc.boot
+ rm -f ${DESTDIR}${PREFIX}/lib/init/rc.shutdown