From 20a2c9427f1931505416ec9c9c751bbad90aa1a7 Mon Sep 17 00:00:00 2001 From: Jeremy Katz Date: Tue, 20 Mar 2007 18:52:34 +0000 Subject: 2007-03-20 Jeremy Katz * liveinst/: Add bits for live CD hard drive installation kick off to anaconda for now. * anaconda.spec: Likewise. * Makefile: Likewise. --- liveinst/Makefile | 21 +++++++++++++++++++++ liveinst/README | 1 + liveinst/liveinst.console | 3 +++ liveinst/liveinst.desktop | 12 ++++++++++++ liveinst/liveinst.pam | 4 ++++ liveinst/liveinst.sh | 25 +++++++++++++++++++++++++ liveinst/liveinst.xinit | 9 +++++++++ 7 files changed, 75 insertions(+) create mode 100644 liveinst/Makefile create mode 100644 liveinst/README create mode 100644 liveinst/liveinst.console create mode 100644 liveinst/liveinst.desktop create mode 100644 liveinst/liveinst.pam create mode 100644 liveinst/liveinst.sh create mode 100755 liveinst/liveinst.xinit (limited to 'liveinst') diff --git a/liveinst/Makefile b/liveinst/Makefile new file mode 100644 index 000000000..54da86a3f --- /dev/null +++ b/liveinst/Makefile @@ -0,0 +1,21 @@ +all: + +install: + mkdir -p $(DESTDIR)/usr/bin + mkdir -p $(DESTDIR)/usr/sbin + mkdir -p $(DESTDIR)/usr/share/applications + mkdir -p $(DESTDIR)/etc/pam.d $(DESTDIR)/etc/security/console.apps + mkdir -p $(DESTDIR)/etc/X11/xinit/xinitrc.d + + install -m 0755 liveinst.sh $(DESTDIR)/usr/sbin/liveinst + ln -s consolehelper $(DESTDIR)/usr/bin/liveinst + + install -m 0644 liveinst.pam $(DESTDIR)/etc/pam.d/liveinst + install -m 0644 liveinst.console $(DESTDIR)/etc/security/console.apps/liveinst + + install -m 0644 liveinst.desktop $(DESTDIR)/usr/share/applications + + install -m 0755 liveinst.xinit $(DESTDIR)/etc/X11/xinit/xinitrc.d/zz-liveinst + +clean: + rm -f *~ diff --git a/liveinst/README b/liveinst/README new file mode 100644 index 000000000..afa64e0b3 --- /dev/null +++ b/liveinst/README @@ -0,0 +1 @@ +Simple wrapper around anaconda to kick off an install from a live CD diff --git a/liveinst/liveinst.console b/liveinst/liveinst.console new file mode 100644 index 000000000..ef32d3063 --- /dev/null +++ b/liveinst/liveinst.console @@ -0,0 +1,3 @@ +USER=root +PROGRAM=/usr/sbin/liveinst +SESSION=true diff --git a/liveinst/liveinst.desktop b/liveinst/liveinst.desktop new file mode 100644 index 000000000..d7d8ac061 --- /dev/null +++ b/liveinst/liveinst.desktop @@ -0,0 +1,12 @@ +[Desktop Entry] +Name=Install to Hard Drive +GenericName=Install +Comment=Install the live CD to your hard disk +Categories=System;Utility;X-Red-Hat-Base;X-Fedora;GNOME;GTK; +Exec=/usr/bin/liveinst +Terminal=false +Type=Application +Icon=fedora-logo-icon +Encoding=UTF-8 +StartupNotify=true +NoDisplay=true diff --git a/liveinst/liveinst.pam b/liveinst/liveinst.pam new file mode 100644 index 000000000..c7d67e332 --- /dev/null +++ b/liveinst/liveinst.pam @@ -0,0 +1,4 @@ +#%PAM-1.0 +auth include config-util +account include config-util +session include config-util diff --git a/liveinst/liveinst.sh b/liveinst/liveinst.sh new file mode 100644 index 000000000..de8fdfa4a --- /dev/null +++ b/liveinst/liveinst.sh @@ -0,0 +1,25 @@ +#!/bin/sh +# +# Simple script to kick off an install from a live CD +# + +if [ -z "$LIVE_MOUNT_PATH" ]; then + LIVE_MOUNT_PATH="/mnt/livecd" +fi + +if [ ! -f /.livecd-configured ]; then + zenity --error --title="Not a Live CD" --text "Can't do live CD installation unless running on a live CD" +fi + +export ANACONDA_PRODUCTNAME="Fedora" +export ANACONDA_PRODUCTVERSION=$(rpm -q fedora-release --qf "%{VERSION}") +export ANACONDA_BUGURL="https://bugzilla.redhat.com/bugzilla/" + +export PATH=/sbin:/usr/sbin:$PATH + +if [ -z "$LANG" ]; then + LANG="en_US.UTF-8" +fi + +# eventually, we might want to allow a more "normal" install path +/usr/sbin/anaconda --method=livecd://$LIVE_MOUNT_PATH --lang $LANG diff --git a/liveinst/liveinst.xinit b/liveinst/liveinst.xinit new file mode 100755 index 000000000..f4e47d7fe --- /dev/null +++ b/liveinst/liveinst.xinit @@ -0,0 +1,9 @@ +#!/bin/sh +# Set up a launcher on the desktop for the live installer if we're on +# a live CD + +test -f /.livecd-configured || exit 0 + +test -f ${XDG_CONFIG_HOME:-~/.config}/user-dirs.dirs && source ${XDG_CONFIG_HOME:-~/.config}/user-dirs.dirs + +cp /usr/share/applications/liveinst.desktop ${XDG_DESKTOP_DIR:-$HOME/Desktop} -- cgit