source: scripts/scripts/untested/blfs-scripts/blfs-hal.sh @ 0b402ff

clfs-1.2clfs-2.1clfs-3.0.0-systemdclfs-3.0.0-sysvinitsystemdsysvinit
Last change on this file since 0b402ff was 0b402ff, checked in by Jim Gifford <clfs@…>, 15 years ago

r698@server (orig r696): ryan | 2005-11-13 00:00:47 -0800

r704@rei: lfs | 2005-11-13 19:01:08 +1100
Import updates for untested blfs-scripts



  • Property mode set to 100755
File size: 1.9 KB
Line 
1#!/bin/bash
2
3### hal ###
4
5cd ${SRC}
6LOG=hal-blfs.log
7
8SELF=`basename ${0}`
9set_buildenv
10set_libdirname
11setup_multiarch
12if [ ! "${libdirname}" = "lib" ]; then
13   extra_conf="--libdir=/usr/${libdirname}"
14fi
15
16# This could be a little hairy... Uncomment to enable hal to update /etc/fstab
17use_fstab_sync="Y"
18
19unpack_tarball hal-${HAL_VER}
20cd ${PKGDIR}
21
22if [ "${use_fstab_sync}" = "Y" ]; then
23   extra_conf="${extra_conf} --enable-fstab-sync"
24fi
25
26max_log_init hal ${HAL_VER} "blfs (shared)" ${CONFLOGS} ${LOG}
27CC="${CC-gcc} ${ARCH_CFLAGS}" \
28CXX="${CXX-g++} ${ARCH_CFLAGS}" \
29CFLAGS="-O2 -pipe ${TGT_CFLAGS}" \
30CXXFLAGS="-O2 -pipe ${TGT_CFLAGS}" \
31LDFLAGS="-L/usr/${libdirname}" \
32./configure --prefix=/usr ${extra_conf} \
33  --sysconfdir=/etc \
34  --localstatedir=/var \
35  --mandir=/usr/share/man \
36  --infodir=/usr/share/info \
37   >> ${LOGFILE} 2>&1 &&
38echo " o Configure OK" &&
39
40min_log_init ${BUILDLOGS} &&
41make \
42   >> ${LOGFILE} 2>&1 &&
43echo " o Build OK" &&
44
45min_log_init ${INSTLOGS} &&
46(
47   # for the moment create haldaemon group and user to be 65532...
48   groupadd -g 65532 haldaemon
49   useradd -u 65532 -g haldaemon -c "hal daemon user" -d /dev/null \
50           -s /bin/false haldaemon
51   mkdir -p /var/run/hald
52   chmod haldaemon:haldaemon /var/run/hald
53
54   make install || barf
55
56   cp hald/haldaemon /etc/rc.d/init.d/
57   chmod 755 /etc/rc.d/init.d/haldaemon
58
59   sed -i -e 's@status \$processname@statusproc $processname@g' \
60          -e 's@daemon --check .*@loadproc /usr/sbin/hald --retain-privileges@g' \
61          -e 's@killall@killproc@g' \
62          -e 's@servicename -TERM@processname -TERM@g' \
63      /etc/rc.d/init.d/haldaemon
64
65   for runlevel in 3 4 5; do
66      ln -sf ../init.d/haldaemon /etc/rc.d/rc${runlevel}.d/S98haldaemon
67   done
68
69   for runlevel in 0 1 2 6; do
70      ln -sf ../init.d/haldaemon /etc/rc.d/rc${runlevel}.d/K02haldaemon
71   done
72) >> ${LOGFILE} 2>&1 &&
73echo " o ALL OK" || barf
74
75
Note: See TracBrowser for help on using the repository browser.