The implementation / architecture of the PET package, is as follows:
1. PPM unpacks sourcefiles into the two subdirs
--a. /usr/local/new_libfreetype
--b. /usr/local/new_fontconfig
2. PPM starts post-install script pinstall.sh, pinstall.sh does the following:
--a. Creates a subdir and copies existing libfreetype.s* into it (/usr/local/original_libfreetype)
--b. Creates a subdir and copies existing font config files into it (/usr/local/original_fontconfig)
--c. Creates a subdir and copies rc.local into it (/usr/local/original_libfreetype/original_rc_local)
--d. Copies from new_libfreetype, into /root/Startup, a bash script restore_original_rc_local
--e. Appends a line to rc.local for execution during next reboot. The line calls a script called run_upon_first_next_reboot.
--f. Calls up defaultbrowser with an advisory page on patents.
--g. calls up defaulttexteditor with a message assuring that all is OK and instructing to reboot.
3. Then, when the user reboots:
--a. The appended-to rc.local calls run_upon_first_next_reboot.
--b. run_upon_first_next_reboot copies the upgraded libfreetype libs into /usr/bin over the old ones, and upgraded font config files into /etc/fonts.
--c. X starts, and /root/Startup/restore_original_rc_local executes. restore_original_rc_local does the following:
--d. if a marker file (supplied in the source) is present, copies the original rc.local from its temporary stashplace /usr/local/original_libfreetype/original_rc_local back over the appended-to copy in /etc/rc.d.
--e. --and then deletes the marker file in /usr/local/new_libfreetype, so rc.local gets re-copied in only once.
--f. And finally, calls up defaulttexteditor with a congratulations notice.
It all works beautifully EXCEPT that in step 2c the pinstall.sh script is failing to create a copy of rc.local. Therefore, step 3d fails, and so at the end,...well,...the thrilled user has BCI-hinting-enabled freetype and is dazzled at the sharpness and glows with success, all right...but, rc.local still has the additional appended line. The extra line does no harm, because it can be made conditional, to execute only if the first-time-run marker file (gone after step 3e) is present, ...but for the sake of stylistic cleanness, the appended line shouldn't be there, i.e. the original rc.local should be copied back in.
Here is the snippet from pinstall.sh which is not obliging me:
Code: Select all
# Create a backup of rc.local preparatory to the after-reboot portion of this installation:
if [ ! -d /usr/local/original_libfreetype ]; then
mkdir /usr/local/original_libfreetype
sync
fi
if [ ! -d /usr/local/original_libfreetype/original_rc_local ]; then
mkdir /usr/local/original_libfreetype/original_rc_local
sync
fi
if [! -f /usr/local/original_libfreetype/original_rc_local/rc.local ]; then
cp -f /etc/rc.d/rc.local /usr/local/original_libfreetype/original_rc_local/rc.local
sync
fi
TIA,
Philip