summaryrefslogtreecommitdiffstats
path: root/build_tools/larch8/larch0/profiles/linhes-local-disk-testing-i686
diff options
context:
space:
mode:
authorJames Meyer <jams@linhes.org>2010-12-05 00:49:02 (GMT)
committerJames Meyer <jams@linhes.org>2010-12-05 00:49:02 (GMT)
commit4f17415f31a3d37b97fbcd42623533e1548d7cf3 (patch)
tree202ac70d89e19c275829e524fe36dc08af92a95f /build_tools/larch8/larch0/profiles/linhes-local-disk-testing-i686
parentf51fb708846d13222bd97b3f760eb3be902c0be0 (diff)
downloadlinhes_dev-4f17415f31a3d37b97fbcd42623533e1548d7cf3.zip
larch8: fix pacman.conf.repos so that it's unique to each profile.
Diffstat (limited to 'build_tools/larch8/larch0/profiles/linhes-local-disk-testing-i686')
-rwxr-xr-xbuild_tools/larch8/larch0/profiles/linhes-local-disk-testing-i686/addedpacks2
-rwxr-xr-xbuild_tools/larch8/larch0/profiles/linhes-local-disk-testing-i686/pacman.conf.repos8
-rw-r--r--build_tools/larch8/larch0/profiles/linhes-local-disk-testing-i686/rootoverlay/etc/rc.d/functions.d/larch-hooks90
3 files changed, 95 insertions, 5 deletions
diff --git a/build_tools/larch8/larch0/profiles/linhes-local-disk-testing-i686/addedpacks b/build_tools/larch8/larch0/profiles/linhes-local-disk-testing-i686/addedpacks
index 3972964..49986ae 100755
--- a/build_tools/larch8/larch0/profiles/linhes-local-disk-testing-i686/addedpacks
+++ b/build_tools/larch8/larch0/profiles/linhes-local-disk-testing-i686/addedpacks
@@ -53,7 +53,7 @@ unzip
ttf-ms-fonts
#xorg-video-drivers
-xf86-video-amd
+#xf86-video-amd
xf86-video-apm
xf86-video-ark
xf86-video-ati
diff --git a/build_tools/larch8/larch0/profiles/linhes-local-disk-testing-i686/pacman.conf.repos b/build_tools/larch8/larch0/profiles/linhes-local-disk-testing-i686/pacman.conf.repos
index 0aa3c75..71a9aec 100755
--- a/build_tools/larch8/larch0/profiles/linhes-local-disk-testing-i686/pacman.conf.repos
+++ b/build_tools/larch8/larch0/profiles/linhes-local-disk-testing-i686/pacman.conf.repos
@@ -9,7 +9,7 @@
#larch: Server = ftp://ftp.berlios.de/pub/larch/larch7.2/*platform*
larch: Server = http://linhes.org/repo//larch/larch8/i686
-core-testing: Server = http://localmirror/repo/i686/core-testing
-extra-testing: Server = http://localmirror/repo/i686/extra-testing
-#core-testing: Server = file:///data/pkg_repo/i686/core-testing
-#extra-testing: Server = file:///data/pkg_repo/i686/extra-testing
+#core-testing: Server = http://localmirror/repo/i686/core-testing
+#extra-testing: Server = http://localmirror/repo/i686/extra-testing
+core-testing: Server = file:///data/pkg_repo/i686/core-testing
+extra-testing: Server = file:///data/pkg_repo/i686/extra-testing
diff --git a/build_tools/larch8/larch0/profiles/linhes-local-disk-testing-i686/rootoverlay/etc/rc.d/functions.d/larch-hooks b/build_tools/larch8/larch0/profiles/linhes-local-disk-testing-i686/rootoverlay/etc/rc.d/functions.d/larch-hooks
new file mode 100644
index 0000000..b43b5c5
--- /dev/null
+++ b/build_tools/larch8/larch0/profiles/linhes-local-disk-testing-i686/rootoverlay/etc/rc.d/functions.d/larch-hooks
@@ -0,0 +1,90 @@
+# larch handlers for rc. script hooks
+# 2010.10.14
+
+
+sysinit_premount_larch() {
+# status "larch sysinit_premount hook"
+# # Rebuild /etc/mtab
+# grep "^aufs */ " /proc/mounts >/etc/mtab.new
+# grep "^tmpfs */.livesys " /proc/mounts >>/etc/mtab.new
+# if [ -d /.livesys/medium/larch ]; then
+# grep " /.livesys/medium " /proc/mounts >>/etc/mtab.new
+# fi
+# grep -v "^rootfs " /etc/mtab >>/etc/mtab.new
+# mv /etc/mtab.new /etc/mtab
+
+ # Add disk partitions to /etc/fstab
+ x10d_fstab
+}
+add_hook sysinit_premount sysinit_premount_larch
+
+
+sysinit_end_larch() {
+ # Allow setting up of xorg.conf before xorg is started
+ #status "larch sysinit_end hook"
+ [ -x /etc/X11/xinit/xorg.conf.set ] && /etc/X11/xinit/xorg.conf.set
+}
+add_hook sysinit_end sysinit_end_larch
+
+
+shutdown_postkillall_larch() {
+ #status "larch shutdown_postkillall hook"
+ if ! [ -f /.livesys/saveclock ]; then
+ # This will prevent the hardware clock from being set
+ HARDWARECLOCK='LIVE'
+ fi
+}
+add_hook shutdown_postkillall shutdown_postkillall_larch
+
+
+shutdown_poweroff_larch() {
+ #status "larch shutdown_poweroff hook"
+
+ # This shouldn't be needed, but better safe than sorry?
+ sync
+
+ # Eject CD/DVD
+ ############################# Deal with ejecting
+ # See if boot device still mounted and ejectable (CD/DVD)
+ bootdev=$( cat /.livesys/bootdevice )
+ if [ -f /proc/sys/dev/cdrom/info ]; then
+ cdroms=$( cat /proc/sys/dev/cdrom/info | { while read a b c; do
+ if [ "${a}" = "drive" -a "${b}" = "name:" ]; then
+ echo "${c}"
+ break
+ fi
+ done
+ } )
+ for d in ${cdroms}; do
+ if [ "/dev/${d}" = "${bootdev}" ]; then
+ # booted from CD/DVD
+ if grep "^${bootdev} " /proc/mounts &>/dev/null; then
+ # it needs to be ejected
+ doeject ${bootdev}
+ fi
+ break
+ fi
+ done
+ fi
+}
+add_hook shutdown_poweroff shutdown_poweroff_larch
+
+doeject ()
+{
+ echo "Ejecting live CD"
+ mount -n -o remount,rw /
+ # Remove the boot medium from /etc/mtab so that eject works
+ sed "/ \/.livesys\/medium / d" -i /etc/mtab
+ eject $1
+ mount -n -o remount,ro /
+# echo "========================================"
+# echo "It's safe to switch the computer off now"
+# echo -ne "Press Enter to continue"
+# read junk
+ for i in 10 9 8 7 6 5 4 3 2 1
+ do
+ sleep 1
+ printf "\r%02d" $i
+ done
+ eject -t $1
+}