[Helpful scripts] Useful add-on scripts for B/LFS
I've recently been crafting some extra scripts that can be used in Linux From Scratch using the template script and some reverse engineering of scripts from Slackware.
Though he may not read it, many thanks to Patrick Volkerding for keeping Slackware a script based init system or this effort would not have been possible. And many thanks as well to Bruce Dubbs and crew from LFS for providing a useful template script. If you have any other scripts you'd like to share feel free to post them here and include instructions on how to use them. A brief description is not necessary, but it will be smiled upon. ================================================== Name: ConsoleKit Usage: Provides a start and stop daemon script for ConsoleKit to ensure complete shutdown of the service once the system is issued the halt/reboot/shutdown/poweroff signal. Script (install to /etc/rc.d/init.d): Code:
#!/bin/sh Code:
ln -sf ../../init.d/consolekit /etc/rc.d/rc0.d/K29consolekit |
I have been using a barely modified copy of Slackware's package management, so these should work for anyone who also uses Slack's tools. With some modification it should work fine with a custom-made tarball package management, which I plan to create, but not yet. I fall short in many areas when it comes to Linux, but I enjoy making scripts.
First is my "buildit" script. It is intended for use with package creation. It is very buggy if you redirect the output to a file. I decided to write this one when I realized somewhere during BLFS that my /lib64 directory wasn't a symlink to /lib like it was supposed to be. I'd like to rework a few parts, include more error checking, and clean it up a bit, but I haven't worked out the correct syntaxes yet. Usage is: buildit.sh <appname> <optional version number> This moves the contents of the lib64 directories into lib, strips debugging symbols, then executes makepkg, incorporating the <appname> <version> arguments into the file name for that is automatically saved into the local repository directory. The REPO variable prepends $LFS so that it should work both during the tools build, and the chroot build. Code:
#!/bin/bash Code:
#!/bin/bash # pkgprobe lynx =================================================== /repo/lynx-2.8.9dev8-x86_64-1jh.tgz contains: =================================================== ./usr/bin/lynx ./etc/lynx/ Hopefully someone finds these tools useful. What I like most about these two scripts is that they can be used during every stage of B/LFS, even as early as creating the temporary toolchain, if one so desires. |
All times are GMT -5. The time now is 11:04 AM. |