Installation manual
60 6. Manual System Configuration
#Load the current and new profile
PROFILE_CUR=‘cat $VPN_STATE_FILE |awk ’{print $3}’‘
PROFILE_NEW=‘cat $PROFILE_STATE_FILE | awk ’{print $3}’‘
echo "PROFILE: " $PROFILE_NEW
#Ifthe new and current profiles are the same, exit here
["$PROFILE_NEW" != "$PROFILE_CUR" ] || exit 0
#Run Stop−Scripts for the current profile
cd $PROFILE_DIR/$PROFILE_CUR/rc.d
for SCRIPT in $(echo K[0−9][0−9]*); do
if [ −n "$SCRIPT" ]; then
case "$SCRIPT" in
(*.sh)
/bin/sh ./$SCRIPT stop
;;
(*)
./$SCRIPT stop
;;
esac
fi
done
#Copy all profile specific files for the new profile
cd $PROFILE_DIR/$PROFILE_NEW/files.d
tar cf − . | (cd /; tar xf −)
#Run the Start−Scripts for the new profile
cd $PROFILE_DIR/$PROFILE_NEW/rc.d
for SCRIPT in $(echo S[0−9][0−9]*); do
if [ −n "$SCRIPT" ]; then
case "$SCRIPT" in
(*.sh)
/bin/sh ./$SCRIPT start
;;
(*)
./$SCRIPT start
;;
esac
fi
done
#Save new profile
echo $PROFILE_CUR" −−> "$PROFILE_NEW > $VPN_STATE_FILE
Last but not least we need a small init script, which brings our network profile management into a well defined
state upon booting the machine:
/etc/init.d/network_profile:
#!/bin/sh
if [ ! −d /var/run/network ]; then
mkdir /var/run/network
fi
echo "offline −−> offline" > /var/run/network/profile
echo "offline −−> offline" > /var/run/network/vpn
We link this newscript into the runleveldirectories /etc/rcN.d either by hand or using the update-rc.d command.
6. 3. XFontpath Configuration
First of all, there is no real need to install a font server on our laptop. Font servers are typically needed, where
we have a bunch of diskless graphics terminals (X terminals), which need to download the fonts from some-
where. But our laptop will certainly not play the font server for somesuch terminals. If available on the local net-
work, we may want to configure for such an external font server,though.
Our display resolution is 133 dpi. The pixmap fonts of XFree86 come, however, intwo flavours only: 75 dpi and
100 dpi. Wecan immediately forget about installing the 75 dpi fonts and settle on the 100 dpi fonts. But even