summaryrefslogtreecommitdiff
path: root/src/lib
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib')
-rw-r--r--src/lib/lib-software.sh39
-rw-r--r--src/lib/setup_TOPROCESS67
2 files changed, 39 insertions, 67 deletions
diff --git a/src/lib/lib-software.sh b/src/lib/lib-software.sh
new file mode 100644
index 0000000..d2fc82f
--- /dev/null
+++ b/src/lib/lib-software.sh
@@ -0,0 +1,39 @@
+#!/bin/sh
+
+
+# run_mkinitcpio() taken from setup. adapted a bit. TODO: GET ALL THE UI CODE OUT OF HERE !!
+# runs mkinitcpio on the target system, displays output
+#
+run_mkinitcpio()
+{
+ target_special_fs on
+ # all mkinitcpio output goes to /tmp/mkinitcpio.log, which we tail
+ # into a dialog
+ ( \
+ touch /tmp/setup-mkinitcpio-running
+ echo "mkinitcpio progress ..." > /tmp/mkinitcpio.log; \
+ echo >> /tmp/mkinitcpio.log; \
+ chroot "$TARGET_DIR" /sbin/mkinitcpio -p kernel26 >>/tmp/mkinitcpio.log 2>&1
+ echo $? > /tmp/.mkinitcpio-retcode
+ echo >> /tmp/mkinitcpio.log
+ rm -f /tmp/setup-mkinitcpio-running
+ ) &
+
+ sleep 2
+
+ DIALOG --title "Rebuilding initcpio images ..." \
+ --no-kill --tailboxbg "/tmp/mkinitcpio.log" 18 70 2>$ANSWER
+ while [ -f /tmp/setup-mkinitcpio-running ]; do
+ sleep 1
+ done
+ kill $(cat $ANSWER)
+
+ target_special_fs off
+
+ # alert the user to fatal errors
+ if [ $(cat /tmp/.mkinitcpio-retcode) -ne 0 ]; then
+ DIALOG --title "MKINITCPIO FAILED - SYSTEM MAY NOT BOOT" --exit-label \
+ "Continue" --textbox "/tmp/mkinitcpio.log" 18 70
+ return 1
+ fi
+}
diff --git a/src/lib/setup_TOPROCESS b/src/lib/setup_TOPROCESS
index 5ce5cb1..2e4391a 100644
--- a/src/lib/setup_TOPROCESS
+++ b/src/lib/setup_TOPROCESS
@@ -171,36 +171,6 @@ EOF
S_MKFSAUTO=1
}
-partition() {
- if [ "$S_MKFSAUTO" = "1" ]; then
- DIALOG --msgbox "You have already prepared your filesystems with Auto-prepare" 0 0
- return 0
- fi
-
- _umountall
-
- # Select disk to partition
- DISCS=$(finddisks _)
- DISCS="$DISCS OTHER - DONE +"
- DIALOG --msgbox "Available Disks:\n\n$(_getavaildisks)\n" 0 0
- DISC=""
- while true; do
- # Prompt the user with a list of known disks
- DIALOG --menu "Select the disk you want to partition (select DONE when finished)" 14 55 7 $DISCS 2>$ANSWER || return 1
- DISC=$(cat $ANSWER)
- if [ "$DISC" = "OTHER" ]; then
- DIALOG --inputbox "Enter the full path to the device you wish to partition" 8 65 "/dev/sda" 2>$ANSWER || return 1
- DISC=$(cat $ANSWER)
- fi
- # Leave our loop if the user is done partitioning
- [ "$DISC" = "DONE" ] && break
- # Partition disc
- DIALOG --msgbox "Now you'll be put into the cfdisk program where you can partition your hard drive. You should make a swap partition and as many data partitions as you will need. NOTE: cfdisk may tell you to reboot after creating partitions. If you need to reboot, just re-enter this install program, skip this step and go on to step 2." 18 70
- cfdisk $DISC
- done
- S_PART=1
-}
-
mountpoints() {
if [ "$S_MKFSAUTO" = "1" ]; then
DIALOG --msgbox "You have already prepared your filesystems with Auto-prepare" 0 0
@@ -884,43 +854,6 @@ prepare_harddrive()
NEXTITEM="1"
}
-# run_mkinitcpio()
-# runs mkinitcpio on the target system, displays output
-#
-run_mkinitcpio()
-{
- chroot_mount
- # all mkinitcpio output goes to /tmp/mkinitcpio.log, which we tail
- # into a dialog
- ( \
- touch /tmp/setup-mkinitcpio-running
- echo "mkinitcpio progress ..." > /tmp/mkinitcpio.log; \
- echo >> /tmp/mkinitcpio.log; \
- chroot "$TARGET_DIR" /sbin/mkinitcpio -p kernel26 >>/tmp/mkinitcpio.log 2>&1
- echo $? > /tmp/.mkinitcpio-retcode
- echo >> /tmp/mkinitcpio.log
- rm -f /tmp/setup-mkinitcpio-running
- ) &
-
- sleep 2
-
- DIALOG --title "Rebuilding initcpio images ..." \
- --no-kill --tailboxbg "/tmp/mkinitcpio.log" 18 70 2>$ANSWER
- while [ -f /tmp/setup-mkinitcpio-running ]; do
- sleep 1
- done
- kill $(cat $ANSWER)
-
- chroot_umount
-
- # alert the user to fatal errors
- if [ $(cat /tmp/.mkinitcpio-retcode) -ne 0 ]; then
- DIALOG --title "MKINITCPIO FAILED - SYSTEM MAY NOT BOOT" --exit-label \
- "Continue" --textbox "/tmp/mkinitcpio.log" 18 70
- return 1
- fi
-}
-
configure_system()
{
## PREPROCESSING ##