Browse Source

Benjamin Schieder:


			
			
				rocklinux
			
			
		
Benjamin Schieder 17 years ago
parent
commit
a96713b21e
13 changed files with 571 additions and 17 deletions
  1. +1
    -1
      target/tor/VERSION
  2. +42
    -4
      target/tor/build_stage2.sh
  3. +7
    -3
      target/tor/config.in
  4. +11
    -1
      target/tor/dillo.patch
  5. +4
    -1
      target/tor/download.txt
  6. +17
    -0
      target/tor/fixedfiles/bookmarks.html
  7. +120
    -0
      target/tor/fixedfiles/firefox.js
  8. +2
    -2
      target/tor/fixedfiles/icewm_menu
  9. +209
    -0
      target/tor/fixedfiles/mod_grub.sh
  10. +135
    -4
      target/tor/fixedfiles/mod_rockate.sh
  11. +1
    -1
      target/tor/fixedfiles/rock-menu
  12. +18
    -0
      target/tor/packages
  13. +4
    -0
      target/tor/pkg_grub.conf

+ 1
- 1
target/tor/VERSION

@ -1 +1 @@
0.3.1
0.4.0.0

+ 42
- 4
target/tor/build_stage2.sh

@ -46,9 +46,14 @@ elif [ "${ROCKCFG_TARGET_TOR_SIZE}" == "files" ] ; then
done < $base/target/tor/needed_files
fi
#
echo_status "Saving boot/* - we do not need this on the 2nd stage ..."
rm -rf ../boot ; mkdir ../boot
mv boot/* ../boot/
if [ "${ROCKCFG_TARGET_TOR_SIZE}" != "ultimate" ] ; then
echo_status "Saving boot/* - we do not need this on the 2nd stage ..."
rm -rf ../boot ; mkdir ../boot
mv boot/* ../boot/
else
mkdir ../boot
cp -r boot/* ../boot/
fi
#
echo_status "Remove the stuff we do not need ..."
rm -rf usr/src var/adm
@ -77,6 +82,37 @@ cp -f $base/target/$target/fixedfiles/xorg.conf etc/X11/xorg.conf
echo_status "Creating home directories and users..."
mkdir -p home/{rocker,root}
chown 1000:100 home/rocker
#
if [ -d usr/lib/firefox-* ] ; then
echo_status "Adding Firefox Plugins..."
read v ffversion < <( grep '^.V. ' $base/package/x11/firefox/firefox.desc )
grep xpi $base/target/$target/download.txt | cut -f2 -d' ' | while read xpi ; do
echo "- $xpi"
tmp="$(mktemp -d)"
cd $tmp
unzip $base/download/mirror/${xpi:0:1}/${xpi}
sed -e "s,<em:maxVersion>.*</em:maxVersion>,<em:maxVersion>${ffversion}</em:maxVersion>,g" -i install.rdf
sed -e "s,em:maxVersion=\".*\",em:maxVersion=\"${ffversion}\",g" -i install.rdf
read id < <( grep "em:id" install.rdf | head -n 1 | sed 's,^.*\({.*}\).*$,\1,g' )
cd -
mv $tmp "usr/lib/firefox-$ffversion/extensions/${id}"
find usr/lib/firefox-$ffversion/extensions/${id} -type d -exec chmod 0755 {} \;
find usr/lib/firefox-$ffversion/extensions/${id} ! -type d -exec chmod 0644 {} \;
done
echo_status "Setting FireFox defaults..."
#pref("network.proxy.http", "localhost");
tmp="$(mktemp)"
grep pref $base/target/$target/fixedfiles/firefox.js | while read line ; do
item="${line#pref(\"}"
item="${item%%\",*}"
grep -v "\"${item}\"" usr/lib/firefox-$ffversion/defaults/pref/firefox.js > $tmp
echo "${line}" >> $tmp
cat $tmp > usr/lib/firefox-$ffversion/defaults/pref/firefox.js
done
rm -f $tmp
cp $base/target/$target/fixedfiles/bookmarks.html usr/lib/firefox-$ffversion/defaults/profile/bookmarks.html
fi
sed -i -e 's,root:.*,root::0:0:root:/home/root:/bin/bash,' etc/passwd
sed -i -e 's,root:.*,root:$1$9KtEb9vt$IDoD/c7IG5EpCwxvBudgA:13300::::::,' etc/shadow
@ -92,10 +128,11 @@ echo_status "activating shadowfs through /etc/ld.so.preload"
echo "/usr/lib/libcowfs.so" > etc/ld.so.preload
#
echo_status "adding a few additional files"
cp -v $base/download/mirror/t/tor_aliases_v4 etc/profile.d
cp -v $base/download/mirror/t/tor_aliases_v5 etc/profile.d
echo ROCKate > etc/HOSTNAME
echo "export WINDOWMANAGER=\"/usr/bin/icewm-session\"" > etc/profile.d/windowmanager
echo "if [ \"\${TERM}\" == \"xterm\" ] ; then export TERM=\"xterm-color\" ; fi" > etc/profile.d/xterm-color
echo "export XDM=\"/usr/X11R7/bin/xdm\"" > etc/conf/xdm
echo "#!/bin/bash" > sbin/startx_on_boot
echo "su - rocker -c \". /etc/profile; /usr/X11R7/bin/startx\"" >> sbin/startx_on_boot
@ -132,6 +169,7 @@ if [ "${ROCKCFG_TARGET_TOR_SIZE}" == "files" ] ; then
files="`find bin sbin usr/bin usr/sbin usr/X11/bin -type f -print0 | xargs -0 file | grep ELF | cut -f1 -d:`"
$base/build/$ROCKCFG_ID/usr/bin/upx2 --brute $files < /proc/$$/fd/0 > /proc/$$/fd/1 2> /proc/$$/fd/2 || true
fi
touch etc/$( tr [:lower:] [:upper:] <<< "${ROCKCFG_TARGET_TOR_SIZE}" )
echo_status "Creating 2nd_stage.img.z image... (this takes some time)... "
cd .. ; mksquashfs 2nd_stage 2nd_stage.img.z -noappend > /dev/null 2>&1

+ 7
- 3
target/tor/config.in

@ -69,9 +69,9 @@ echo "pkgfilter sed '" > config/$config.$swpid/predefined-pkgsel.parsed
. ./misc/pkgsel/macros
REMOVE xphelloworld >> config/$config.$swpid/predefined-pkgsel.parsed
REMOVE pcmcia-cs >> config/$config.$swpid/predefined-pkgsel.parsed
for x in icewm imlib glib12 tor privoxy dillo gtk+12 xterm irssi xdialog ; do
ADD $x >> config/$config.$swpid/predefined-pkgsel.parsed
done
while read package ; do
ADD $package >> config/$config.$swpid/predefined-pkgsel.parsed
done < target/tor/packages
. ./misc/pkgsel/minimal+xorg.in >> config/$config.$swpid/predefined-pkgsel.parsed
# end the sed string
echo "'" >> config/$config.$swpid/predefined-pkgsel.parsed
@ -90,3 +90,7 @@ pkgenable udev
pkgenable disktype
pkgenable ucl
pkgenable upx2
pkgenable libxslt
pkgenable libxml2
pkgenable cpan-xml-parser
pkgdisable mesademos

+ 11
- 1
target/tor/dillo.patch

@ -1,6 +1,6 @@
--- dillo-0.8.6/src/IO/about.c.orig 2007-04-25 09:46:33.000000000 +0200
+++ dillo-0.8.6/src/IO/about.c 2007-05-17 17:36:20.000000000 +0200
@@ -33,355 +33,196 @@
@@ -33,355 +33,206 @@
"<!DOCTYPE HTML PUBLIC '-//W3C//DTD HTML 4.01 Transitional//EN'>\n"
"<html>\n"
"<head>\n"
@ -425,6 +425,16 @@
+ "<tr>\n"
+ "<td>\n"
+ "<pre>\n"
+"* V0.4.0.0, June 20th, 2007 \n"
+"\n"
+"* added postinstall support to update mechanism \n"
+"* Ultimate is now installable to harddisk \n"
+"* added FireFox (with Torbutton, AdBlock and Flashblock (but not Flash)) to Ultimate \n"
+"\n"
+"* V0.3.1.1, June 02nd, 2007 \n"
+"\n"
+"* updated some packages\n"
+"\n"
+"* V0.3.1, May 17th, 2007 \n"
+"\n"
+"* added fixes to actually make these nifty things work\n"

+ 4
- 1
target/tor/download.txt

@ -1,5 +1,8 @@
3236835844 tor_aliases_v4 http://shellscripts.org/projects/t/toraliases/version_4/
1864933481 tor_aliases_v5 http://shellscripts.org/projects/t/toraliases/version_5/
1930262293 rockate_640x480.jpg http://pallas.crash-override.net/~blindcoder/
3137166457 rockate_800x600.jpg http://pallas.crash-override.net/~blindcoder/
1408201020 rockate_1024x768.jpg http://pallas.crash-override.net/~blindcoder/
4002653970 rockate_1280x1024.jpg http://pallas.crash-override.net/~blindcoder/
3330244223 flashblock-1.5.3.xpi http://downloads.mozdev.org/flashblock/
0 torbutton-1.1.2-alpha-dev.xpi http://fscked.org/proj/minihax/TorButton/
3000573900 adblock-0.5.3.043-fx+fl+mz+ns.xpi https://addons.mozilla.org/en-US/firefox/downloads/file/45/

+ 17
- 0
target/tor/fixedfiles/bookmarks.html
File diff suppressed because it is too large
View File


+ 120
- 0
target/tor/fixedfiles/firefox.js

@ -0,0 +1,120 @@
// Blocklist preferences
pref("extensions.blocklist.enabled", false);
pref("extensions.blocklist.interval", 0);
pref("extensions.blocklist.url", "");
pref("extensions.blocklist.detailsURL", "http://%LOCALE%.www.mozilla.com/%LOCALE%/blocklist/");
pref("app.update.enabled", false);
pref("app.update.auto", false);
// Defines how the Application Update Service notifies the user about updates:
//
// AUM Set to: Minor Releases: Major Releases:
// 0 download no prompt download no prompt
// 1 download no prompt download no prompt if no incompatibilities
// 2 download no prompt prompt
//
// See chart in nsUpdateService.js.in for more details
pref("app.update.mode", 2);
// If set to true, the Update Service will present no UI for any event.
pref("app.update.silent", false);
// Update service URL:
pref("app.update.url", "https://aus2.mozilla.org/update/2/%PRODUCT%/%VERSION%/%BUILD_ID%/%BUILD_TARGET%/%LOCALE%/%CHANNEL%/%OS_VERSION%/update.xml");
// Interval: Time between checks for a new version (in seconds)
// default=1 day
pref("app.update.interval", 0);
// Interval: Time before prompting the user to download a new version that
// is available (in seconds) default=1 day
pref("app.update.nagTimer.download", 0);
// Interval: Time before prompting the user to restart to install the latest
// download (in seconds) default=30 minutes
pref("app.update.nagTimer.restart", 0);
// Interval: When all registered timers should be checked (in milliseconds)
// default=5 seconds
pref("app.update.timer", 0);
pref("extensions.update.enabled", false);
pref("browser.shell.checkDefaultBrowser", false);
// 0 = blank, 1 = home (browser.startup.homepage), 2 = last visited page, 3 = resume previous browser session
// The behavior of option 3 is detailed at: http://wiki.mozilla.org/Session_Restore
pref("browser.startup.page", 0);
pref("browser.startup.homepage", "about:blank");
pref("browser.startup.homepage_override.mstone", "ignore");
pref("browser.cache.disk.capacity", 0);
// search engines URL
pref("browser.search.searchEnginesURL", "");
// pointer to the default engine name
pref("browser.search.defaultenginename", "chrome://browser-region/locale/region.properties");
// send ping to the server to update
pref("browser.search.update", false);
// disable search suggestions by default
pref("browser.search.suggest.enabled", false);
// handle external links
// 0=default window, 1=current window/tab, 2=new window, 3=new tab in most recent window
pref("browser.link.open_newwindow", 3);
// 3 at the end of the tabstrip
pref("browser.tabs.closeButtons", 3);
// Scripts & Windows prefs
pref("dom.disable_window_open_feature.location", true);
pref("dom.disable_window_status_change", true);
pref("dom.disable_window_move_resize", true);
pref("dom.disable_window_flip", true);
// popups.policy 1=allow,2=reject
pref("privacy.popups.policy", 2);
pref("privacy.popups.usecustom", true);
pref("privacy.popups.firstTime", true);
pref("privacy.popups.showBrowserMessage", true);
pref("privacy.item.history", true);
pref("privacy.item.formdata", true);
pref("privacy.item.passwords", true);
pref("privacy.item.downloads", true);
pref("privacy.item.cookies", true);
pref("privacy.item.cache", true);
pref("privacy.item.siteprefs", true);
pref("privacy.item.sessions", true);
pref("privacy.sanitize.sanitizeOnShutdown", true);
pref("privacy.sanitize.promptOnSanitize", false);
pref("network.cookie.enableForCurrentSessionOnly", true);
pref("accessibility.typeaheadfind", true);
pref("accessibility.typeaheadfind.timeout", 5000);
pref("accessibility.typeaheadfind.linksonly", false);
pref("accessibility.typeaheadfind.flashBar", 1);
pref("layout.spellcheckDefault", 0);
pref("browser.safebrowsing.enabled", false);
pref("browser.safebrowsing.remoteLookups", false);
// Tor stuff
pref("network.proxy.http", "localhost");
pref("network.proxy.http_port", 8118);
pref("network.proxy.socks", "localhost");
pref("network.proxy.socks_port", 9050);
pref("network.proxy.socks_remote_dns", true);
pref("network.proxy.ssl", "localhost");
pref("network.proxy.ssl_port", 8118);
pref("network.proxy.type", 1);
pref("extensions.torbutton.http_port", 8118);
pref("extensions.torbutton.http_proxy", "localhost");
pref("extensions.torbutton.https_port", 8118);
pref("extensions.torbutton.https_proxy", "localhost");
pref("extensions.torbutton.socks_host", "localhost");
pref("extensions.torbutton.socks_port", 9050);
pref("extensions.torbutton.cookie_jars", true);
pref("extensions.torbutton.clear_cookies", false);

+ 2
- 2
target/tor/fixedfiles/icewm_menu

@ -1,4 +1,4 @@
prog Networksetup xterm xterm -e su root /usr/sbin/stone -x11 rockate
prog xterm xterm xterm
prog Networksetup xterm xterm -bg black -fg grey -e su root /usr/sbin/stone -x11 rockate
prog xterm xterm xterm -bg black -fg grey
separator
menufile Programs folder /usr/share/icewm/ROCK

+ 209
- 0
target/tor/fixedfiles/mod_grub.sh

@ -0,0 +1,209 @@
# --- ROCK-COPYRIGHT-NOTE-BEGIN ---
#
# This copyright note is auto-generated by ./scripts/Create-CopyPatch.
# Please add additional copyright information _after_ the line containing
# the ROCK-COPYRIGHT-NOTE-END tag. Otherwise it might get removed by
# the ./scripts/Create-CopyPatch script. Do not edit this copyright text!
#
# ROCK Linux: rock-src/package/x86/grub/stone_mod_grub.sh
# ROCK Linux is Copyright (C) 1998 - 2006 Clifford Wolf
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version. A copy of the GNU General Public
# License can be found at Documentation/COPYING.
#
# Many people helped and are helping developing ROCK Linux. Please
# have a look at http://www.rocklinux.org/ and the Documentation/TEAM
# file for details.
#
# --- ROCK-COPYRIGHT-NOTE-END ---
#
# [MAIN] 70 grub GRUB Boot Loader Setup
create_device_map() {
gui_cmd '(Re-)Create GRUB Device Map' "$( cat << "EOT"
rm -vf /boot/grub/device.map
echo quit | grub --batch --device-map=/boot/grub/device.map
EOT
)"
}
normalize_device() {
local master_devid this_devid this_devname
local device="$1"
master_devid="`ls -lL $device | awk '{print $5 $6;}'`"
while read this_devid this_devname; do
if [ "$this_devid" = "$master_devid" ]; then
device="$this_devname"
fi
done < <( ls -lL --time-style='+xx' /dev/[hs]d[a-z]* |
awk '{print $5 $6 " " $8;}'; )
echo "$device"
}
convert_device () {
device="$1"
# extract device type (block) and major number for root drive
user_drive_maj=`ls -Ll $device |
awk '{if ($6 < 64) printf("%c%d0", $1, $5); else printf("%c%d1", $1, $5)}'`
# does the bios know about the above drive?
tmp_part=""
for bios_drive in `grep -v '^#' /boot/grub/device.map|awk '{print $2}'`; do
test -e $bios_drive || continue
bios_drive_maj=`ls -Ll $bios_drive |
awk '{if ($6 < 64) printf("%c%d0", $1, $5); else printf("%c%d1", $1, $5)}'`
if [ "$user_drive_maj" = "$bios_drive_maj" ]; then
# yupi ya yeh! we found the drive!
root_drive=`grep $bios_drive /boot/grub/device.map | awk '{print $1}'`
tmp_part=`ls -Ll $device | awk '{print $6}'`
break
fi
done
# give up
if [ -z "$tmp_part" ]; then
echo "(unknown)"
return
fi
# convert the partition number to GRUB style
if [ $tmp_part -gt 64 ]; then
# hd[bdfh]
# this doesn't handle the disk itself correctly - just the partitions
root_part=$[$tmp_part-65]
else
root_part=$[$tmp_part-1]
fi
unset tmp_part
drive=`echo $root_drive | sed "s:)$:,$root_part):"`
# Do we need some user confirmation to this result???
# ...
unset device
echo $drive
}
create_boot_menu() {
cat << EOT > /boot/grub/menu.lst
timeout 8
default 0
title ROCKate 1024
kernel $bootdrive$bootpath/vmlinuz root=/dev/ram init=/linuxrc video=vesa:ywrap,mtrr vga=0x317 rw
initrd $bootdrive$bootpath/initrd.img
title ROCKate 1280
kernel $bootdrive$bootpath/vmlinuz root=/dev/ram init=/linuxrc video=vesa:ywrap,mtrr vga=0x31A rw
initrd $bootdrive$bootpath/initrd.img
title ROCKate 800
kernel $bootdrive$bootpath/vmlinuz root=/dev/ram init=/linuxrc video=vesa:ywrap,mtrr vga=0x314 rw
initrd $bootdrive$bootpath/initrd.img
title ROCKate 640
kernel $bootdrive$bootpath/vmlinuz root=/dev/ram init=/linuxrc video=vesa:ywrap,mtrr vga=0x311 rw
initrd $bootdrive$bootpath/initrd.img
title ROCKate Text only
kernel $bootdrive$bootpath/vmlinuz root=/dev/ram init=/linuxrc vga=0 rw 3
initrd $bootdrive$bootpath/initrd.img
EOT
if [ -f /boot/memtest86.bin ] ; then
cat << EOT >> /boot/grub/menu.lst
title MemTest86 (SGI memory tester)
kernel $bootdrive$bootpath/memtest86.bin
EOT
fi
gui_message "This is the new /boot/grub/menu.lst file:
$( cat /boot/grub/menu.lst )"
}
grub_install() {
gui_cmd 'Installing GRUB' "echo -e 'root $bootdrive\\nsetup (hd0)\\nquit' | grub --batch --device-map=/boot/grub/device.map"
}
grub_init() {
rootdev="`grep ' / ' /proc/mounts | tail -n 1 | \
awk '/\/dev\// { print $1; }'`"
bootdev="`grep ' /boot ' /proc/mounts | tail -n 1 | \
awk '/\/dev\// { print $1; }'`"
if [ "$rootdev" = "/dev/root" -a '!' -e /dev/root ]; then
rootdev="`cat /proc/cmdline | tr ' ' '\n' | \
grep '^root=' | cut -f2- -d= | head -n1`"
fi
[ -z "$bootdev" ] && bootdev="$rootdev"
rootdev=`normalize_device $rootdev`
bootdev=`normalize_device $bootdev`
# i=0
# rootdev="$( cd `dirname $rootdev` ; pwd -P )/$( basename $rootdev )"
# while [ -L $rootdev ] ; do
# directory="$( cd `dirname $rootdev` ; pwd -P )"
# rootdev="$( ls -l $rootdev | sed 's,.* -> ,,' )"
# [ "${rootdev##/*}" ] && rootdev="$directory/$rootdev"
# i=$(( $i + 1 )) ; [ $i -gt 20 ] && rootdev="Not found!"
# done
# i=0
# bootdev="$( cd `dirname $bootdev` ; pwd -P )/$( basename $bootdev )"
# while [ -L $bootdev ] ; do
# directory="$( cd `dirname $bootdev` ; pwd -P )"
# bootdev="$( ls -l $bootdev | sed 's,.* -> ,,' )"
# [ "${bootdev##/*}" ] && bootdev="$directory/$bootdev"
# i=$(( $i + 1 )) ; [ $i -gt 20 ] && bootdev="Not found!"
# done
if [ -s /boot/grub/device.map ] ; then
rootdrive=`convert_device $rootdev`
bootdrive=`convert_device $bootdev`
else
rootdrive='No Device Map found!'
bootdrive='No Device Map found!'
fi
if [ "$rootdrive" = "$bootdrive" ]
then bootpath="/boot" ; else bootpath="" ; fi
}
grub_setup() {
if gui_yesno "Do you want to install the GRUB bootloader in MBR now?"; then
grub_init; create_device_map
grub_init; create_boot_menu
grub_init; grub_install
fi
}
main() {
while
grub_init
gui_menu grub 'GRUB Boot Loader Setup' \
'(Re-)Create GRUB Device Map' 'create_device_map' \
"Root Device ... $rootdev" "" \
"Boot Drive .... $bootdrive$boot_path" "" \
'' '' \
'(Re-)Create default boot menu' 'create_boot_menu' \
'(Re-)Install GRUB in MBR of (hd0)' 'grub_install' \
'' '' \
"Edit /boot/grub/device.map (Device Map)" \
"gui_edit 'GRUB Device Map' /boot/grub/device.map" \
"Edit /boot/grub/menu.lst (Boot Menu)" \
"gui_edit 'GRUB Boot Menu' /boot/grub/menu.lst"
do : ; done
}

+ 135
- 4
target/tor/fixedfiles/mod_rockate.sh

@ -23,6 +23,124 @@
#
# ROCKate network setup
rockate_add_bootmenu() {
read VERSION < /etc/ROCKATE_VERSION
disk="${1}"
installon="${2}"
mount ${disk} /mnt/generic
path=/
[ -d /mnt/generic/boot ] && path=/boot
read menulst < <( find /mnt/generic$path -name menu.lst | head -n 1)
read devicemap < <( find /mnt/generic$path -name device.map | head -n 1)
read physical < <( readlink -f ${installon} )
physical=${physical%[0-9]}
if ! grep -q ${physical} ${devicemap} ; then
for x in /dev /proc /sys /tmp ; do
mount --bind $x /mnt/generic$x
done
chroot /mnt/generic stone -text grub create_device_map
for x in /dev /proc /sys /tmp ; do
umount /mnt/generic$x
done
fi
read grubdevice linuxdevice < <( grep ${physical} ${devicemap} )
if [ -z "${grubdevice}" ] ; then
echo "WTF?"
return
fi
cat >> ${menulst} <<-EOF
title ROCKate ${VERSION} 1024
kernel ${grubdevice%)},$(( ${installon##*part} - 1 )))/boot/vmlinuz root=/dev/ram init=/linuxrc video=vesa:ywrap,mtrr vga=0x317 rw
initrd ${grubdevice%)},$(( ${installon##*part} - 1 )))/boot/initrd.img
title ROCKate ${VERSION} 1280
kernel ${grubdevice%)},$(( ${installon##*part} - 1 )))/boot/vmlinuz root=/dev/ram init=/linuxrc video=vesa:ywrap,mtrr vga=0x31A rw
initrd ${grubdevice%)},$(( ${installon##*part} - 1 )))/boot/initrd.img
title ROCKate ${VERSION} 800
kernel ${grubdevice%)},$(( ${installon##*part} - 1 )))/boot/vmlinuz root=/dev/ram init=/linuxrc video=vesa:ywrap,mtrr vga=0x314 rw
initrd ${grubdevice%)},$(( ${installon##*part} - 1 )))/boot/initrd.img
title ROCKate ${VERSION} 640
kernel ${grubdevice%)},$(( ${installon##*part} - 1 )))/boot/vmlinuz root=/dev/ram init=/linuxrc video=vesa:ywrap,mtrr vga=0x311 rw
initrd ${grubdevice%)},$(( ${installon##*part} - 1 )))/boot/initrd.img
title ROCKate ${VERSION} Text only
kernel ${grubdevice%)},$(( ${installon##*part} - 1 )))/boot/vmlinuz root=/dev/ram init=/linuxrc vga=0 rw 3
initrd ${grubdevice%)},$(( ${installon##*part} - 1 )))/boot/initrd.img
EOF
umount /mnt/generic
}
rockate_install_on() {
disk="${1}"
mount ${disk} /mnt/generic || return
cp -arv /mnt/cowfs_ro/* /mnt/generic/
find /mnt/cowfs_rw/ -type f | while read file ; do
target="${file#/mnt/cowfs_rw/}"
mkdir -p /mnt/generic/$( dirname ${target} )
cp -v ${file} /mnt/generic/${target}
done
touch /mnt/generic/etc/HDINSTALL
for x in /dev /proc /sys /tmp ; do
mount --bind $x /mnt/generic$x
done
echo -n > /mnt/generic/etc/ld.so.preload
tmp="$(mktemp)"
grep -v ' / ' /mnt/generic/etc/fstab > $tmp
echo "${disk} / auto defaults 0 0" >> $tmp
mv $tmp /mnt/generic/etc/fstab
chmod 0644 /mnt/generic/etc/fstab
chown rocker.users /mnt/generic/home/rocker -R
chroot /mnt/generic mkinitrd
for x in /dev /proc /sys /tmp ; do
umount /mnt/generic$x
done
umount /mnt/generic
}
rockate_install() {
unset bootparts menu
mkdir -p /mnt/generic
for disk in /dev/disk/by-id/* ; do
mount ${disk} /mnt/generic >/dev/null 2>&1 || continue
if [ -f /mnt/generic/menu.lst -o -f /mnt/generic/boot/menu.lst -o \
-f /mnt/generic/boot/grub/menu.lst -o -f /mnt/generic/grub/menu.lst ] ; then
bootparts="${bootparts} ${disk}"
fi
menu="${menu} 'Install on ${disk##*/} (contains: $( ls -d /mnt/generic/* 2>/dev/null | sed -e 's,^/mnt/generic/,,g' | sed -e 's/^\(.{,80}\).*$/\1/g' ))' 'installon=${disk}; rockate_install_on ${disk}'"
umount /mnt/generic >/dev/null 2>&1
done
eval gui_menu FOO "'ROCKate installation'" ${menu} || return
unset menu
if [ -n "${bootparts}" ] ; then
for x in ${bootparts} ; do
mount $x /mnt/generic
menu="${menu} 'Add ROCKate to $x (contains:"
while read y title ; do
menu="${menu} ${title}"
done < <( grep -i title $( find /mnt/generic -name menu.lst ) )
umount /mnt/generic
menu="${menu})' 'rockate_add_bootmenu ${x} ${installon}'"
done
eval gui_menu FOO "'ROCKate installation'" ${menu} || return
else
mount $disk /mnt/generic
for x in /dev /proc /sys /tmp ; do
mount --bind $x /mnt/generic$x
done
chroot /mnt/generic stone -text grub grub_setup
for x in /dev /proc /sys /tmp ; do
umount /mnt/generic$x
done
umount $disk
fi
}
rockate_configure() {
local device="${1}"
read inet ip rest < <( ip addr show ${device} | grep 'inet ' )
@ -60,6 +178,11 @@ rockate_update(){
tar xf /tmp/update.tar.bz2
cd -
rm -f /tmp/update.tar.bz2
if [ -f /tmp/postupdate.sh ] ; then
chmod +x /tmp/postupdate.sh
/tmp/postupdate.sh
rm -f /tmp/postupdate.sh
fi
done < ${tmp}
rm -f ${tmp}
}
@ -129,7 +252,7 @@ main() {
read inet ip rest < <( ip addr show ${name} | grep 'inet ' )
menu="${menu} 'Device ${name} (${mac})' ''"
menu="${menu} ' IP Address: ${ip}' ''"
menu="${menu} ' Configure via dhcp' 'dhclient ${name}'"
menu="${menu} ' Configure via dhcp' 'dhclient -v ${name}'"
menu="${menu} ' Configure manually' 'rockate_configure ${name}'"
done < <( ifconfig -a | grep HWaddr ) # we only want 'real' interfaces
menu="${menu} '' ''"
@ -137,10 +260,18 @@ main() {
menu="${menu} 'Default Route: ${gw} (via ${dev})' 'rockate_defaultroute ${gw}'"
menu="${menu} '' ''"
menu="${menu} 'Setup transparent Tor proxy (use after network setup)' 'rockate_transparent_tor'"
menu="${menu} 'The following option can be used to update the ROCKate environment at' ''"
menu="${menu} 'runtime if an update file has been provided. These changes will be' ''"
menu="${menu} 'gone after reboot, so please use only if you really want to.' ''"
if [ ! -e /etc/HDINSTALL ] ; then
menu="${menu} 'The following option can be used to update the ROCKate environment at' ''"
menu="${menu} 'runtime if an update file has been provided. These changes will be' ''"
menu="${menu} 'gone after reboot, so please use only if you really want to.' ''"
fi
menu="${menu} 'Update ROCKate' 'rockate_update'"
if [ -f /etc/ULTIMATE -a ! -e /etc/HDINSTALL ] ; then
menu="${menu} '' ''"
menu="${menu} 'Install ROCKate to disk' 'rockate_install'"
menu="${menu} 'See http://xsanr2oqmett7ovm.onion/wiki/show/PostInstall for steps' ''"
menu="${menu} 'to do after installation!' ''"
fi
eval gui_menu FOO "'ROCKate Configuration'" ${menu}
do : ; done
}

+ 1
- 1
target/tor/fixedfiles/rock-menu

@ -24,7 +24,7 @@ process_desktop(){
fi
mkdir -p "${dir}/${Categories}"
if [ "${Terminal}" == "true" -o "${Terminal}" == "1" ] ; then
Exec="xterm -e '${Exec}'"
Exec="xterm -bg black -fg grey -e '${Exec}'"
fi
echo "prog \"${Name}\" \"${Icon:-${Name}}\" ${Exec}" > "${dir}/${Categories}/${Name}"
unset Exec Name Icon Terminal Categories X_ROCK_Name

+ 18
- 0
target/tor/packages

@ -0,0 +1,18 @@
icewm
imlib
glib12
tor
privoxy
dillo
gtk+12
xterm
irssi
xdialog
firefox
gtk+
glib
atk
pango
cairo
libidl
grub

+ 4
- 0
target/tor/pkg_grub.conf

@ -0,0 +1,4 @@
tmp="`mktemp`"
sed -e 's,$confdir/stone_mod_grub.sh,$base/target/$target/fixedfiles/mod_grub.sh,g' $confdir/$pkg.conf > $tmp
. $tmp
rm -f $tmp

Loading…
Cancel
Save