#!/bin/sh #All lines before START INSTALL are ignored by STX Installer; this means one #script can be used for a textual installer and for the graphical installer #It's important to remember that the STX Installer only handles a subset of #bash's scripting features; this should be enough for most installation tasks #but if more functionality is needed pester "webmaster at mikeasoft dot com". echo "Which partition would you like to use for the root partition?" select ROOT in `cat /proc/diskstats | grep -E "[hs]d.[0-9]+" | awk {'print $3'}` do echo "$ROOT selected" break done echo "Which partition would you like to use for the home partition?" select HOME in `cat /proc/diskstats | grep -E "[hs]d.[0-9]+" | awk {'print $3'}` "root" do echo "$HOME selected" break done echo "Which partition would you like to use for swap space?" select SWAP in `cat /proc/diskstats | grep -E "[hs]d.[0-9]+" | awk {'print $3'}` "None" do echo "$SWAP selected" break done echo "What format would you like to partition with?" select FORMAT in "ext2" "ext3" "reiserfs" do echo "$FORMAT selected" break done #The following line tells STX Install to start reading the script for #installation. For more information on this please read the STX Install #manual available at http://linux.mikeasoft.com/stxinstall (doesn't exist yet) ####START INSTALL#### #Format the partitions echo "Formatting Partitions (0%)" if [ -n "$SWAP" ] && [ "$SWAP" != "None" ] then echo "Formatting /dev/$SWAP as swap partition (1%)" umount /dev/$SWAP mkswap /dev/$SWAP swapon /dev/$SWAP fi if [ -n "$SWAP" ] && [ "$HOME" != "root" ] && [ "$HOME" != "$ROOT" ] then echo "Formatting /dev/$HOME as $FORMAT for home (1%)" umount /dev/$HOME fi echo "Formatting /dev/$ROOT as $FORMAT for root (2%)" umount /dev/$ROOT ####END INSTALL####