User Tools

Site Tools


qLinux
… a distribution study


<< Prev
Smdev-0.2.3

Next >>
GLib-2.56.2


Ubase-0.1

Right now we don't have a tool to shutdown or reboot our system. Ubase is an alternative of util-linux which provides the wanted tools - against util-linux doesn't (anymore). However, right now we need the  halt  utility only.

Download: ubase-0.1.tar.gz

Make the following changes to  config.mk 

PREFIX = /qlnx
MANPREFIX = $(PREFIX)/man
CC = gcc

Build the halt utility:

make util.a
gcc -s halt.c util.a -o halt

Install halt:

chmod 0750 halt
cp -v halt /qlnx/bin/libexec/
cp -v halt.8 /qlnx/man/man8/

Another missing program is killall5. Edit the source file  killall5  and change the location of the proc directory to  /qlnx/prc  (2 occurrences). Building it is similar like above. Install killall5:

chmod 0750 halt
cp -v killall5 /qlnx/bin/
cp -v killall5.8 /qlnx/man/man8/

Optional: Repeat the steps for other programs.

It is also possible to replace tools from util-linux. In this case these ones shall be disabled during the build of util-linux.

Back to the halt utility. We installed it in a directory which is not in $PATH, because it is not volitional to execute it directly. We create wrappers for  poweroff  and  reboot :

echo "/qlnx/bin/libexec/halt -p" > /qlnx/bin/poweroff
echo "/qlnx/bin/libexec/halt -r" > /qlnx/bin/reboot
chmod 0754 /qlnx/bin/{poweroff,reboot}

<< Prev
Sinit-1.0

Next >>
Smdev-0.2.3