[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
[or-cvs] r16357: Some minor stuff (see diff) regarding the enabling of the pe (in incognito/trunk/root_overlay: etc/conf.d usr/sbin)
Author: anonym
Date: 2008-08-02 10:40:53 -0400 (Sat, 02 Aug 2008)
New Revision: 16357
Modified:
incognito/trunk/root_overlay/etc/conf.d/local.start
incognito/trunk/root_overlay/usr/sbin/create-homevol
incognito/trunk/root_overlay/usr/sbin/enable-persistent-vol
Log:
Some minor stuff (see diff) regarding the enabling of the persistent home volume if it has been disabled.
Modified: incognito/trunk/root_overlay/etc/conf.d/local.start
===================================================================
--- incognito/trunk/root_overlay/etc/conf.d/local.start 2008-08-02 14:37:26 UTC (rev 16356)
+++ incognito/trunk/root_overlay/etc/conf.d/local.start 2008-08-02 14:40:53 UTC (rev 16357)
@@ -1,14 +1,3 @@
# For some reason, "/media" doesn't appear when running the liveCD although it
# is created by catalyst during build and is present within the image (FIXME).
[[ ! -e /media ]] && mkdir /media
-
-
-# The following detects if the persistent home creation guide has been
-# disabled and in that case puts the re-enabling option on the desktop
-
-# FIXME: we should get this from somewhere
-LOCK_FILE=/mnt/cdrom/LOCK_NO_PERSISTENT
-
-if [[ -e ${LOCK_FILE} ]]; then
- ln -s /usr/share/applications/enable-persistent-vol.desktop /home/__INCOGNITO_USER__/Desktop
-fi
Modified: incognito/trunk/root_overlay/usr/sbin/create-homevol
===================================================================
--- incognito/trunk/root_overlay/usr/sbin/create-homevol 2008-08-02 14:37:26 UTC (rev 16356)
+++ incognito/trunk/root_overlay/usr/sbin/create-homevol 2008-08-02 14:40:53 UTC (rev 16357)
@@ -12,14 +12,14 @@
TITLE="Create Persistent Home Volume"
BACKTITLE="__INCOGNITO__"
LOCK_FILE="${MEDIAROOT}/LOCK_NO_PERSISTENT"
-MIN_SIZE=$(( $(du -sk /home | awk '{print $1}') / 1024 + 11)) # 10 to 11 MB extra so that it works better
+MIN_SIZE=$(( $(du -sk /home | awk '{print $1}') / 1024 + 30)) # add another 30 MB just to be sure it will work.
MAX_SIZE=$(( ${MEDIAFREE} / 1024 ))
QUESTION_HOME_PART="Use the UP and DOWN arrowkeys, and TAB to navigate between different fields and buttons in this guide. You may press ESC/Escape at any time to exit this guide.
Would you like to create a persistent home volume that will keep your data over __INCOGNITO__ sessions? This means that application settings and file changes in your home directory will persist through computer shutdowns which is not normally the case with __INCOGNITO__ (normally everything is reseted on a reboot)."
QUESTION_DISABLE_PERSISTENT="Would you like to disable the previous prompt? That way the start sequence will not get interrupted when booting __INCOGNITO__ like it was this time.
-If you choose 'yes' here this can be undone by running \"Enable persistant home volume\" located on the desktop and in the K-menu once the graphical user interface has started."
+If you choose 'yes' here this can be undone by running \"Enable persistant home volume\" located in the Incognito section of the K-menu."
QUESTION_SIZE="Enter the size in megabytes for the home volume. ${MIN_SIZE} MB is the smallest we allow, but it is strongly recommended to use more. There will be a recommended value in the input field which work for most users. The recommended value will utilize most space but save a little so that future upgrades of __INCOGNITO__ will fit. If you plan to store other files on the media you should take that into account and decrease the volume size appropriately."
QUESTION_ENCRYPTION="Would you like to encrypt the home volume using TrueCrypt? This is strongly recommended as it will make your data unreadable for everyone that does not have the password you choose unless they can guess it. The only inconvenience added for this is that you will be prompted for the password at each start up."
QUESTION_HIDDEN_VOLUME="Do you want to use a hidden home volume?
Modified: incognito/trunk/root_overlay/usr/sbin/enable-persistent-vol
===================================================================
--- incognito/trunk/root_overlay/usr/sbin/enable-persistent-vol 2008-08-02 14:37:26 UTC (rev 16356)
+++ incognito/trunk/root_overlay/usr/sbin/enable-persistent-vol 2008-08-02 14:40:53 UTC (rev 16357)
@@ -3,8 +3,6 @@
# FIXME: we should get this from somewhere
LOCK_FILE=/mnt/cdrom/LOCK_NO_PERSISTENT
-sudo rm -f ${LOCK_FILE}
-
# Find the dialog command
DIALOG="$(which Xdialog 2>/dev/null)"
if [ -z "${DIALOG}" -o -z "${DISPLAY}" ]; then
@@ -14,11 +12,22 @@
DEFAULT_WIDTH=80
DIALOG="${DIALOG} --wrap --cr-wrap --left"
+if [[ ! -e ${LOCK_FILE} ]]; then
+ ${DIALOG} --msgbox "The persistent home volume is already enabled. If you want to disable it, that should be done during the guide next time you boot __INCOGNITO__." 0 ${DEFAULT_WIDTH}
+ exit 1
+fi
+
+if [[ ! -w ${LOCK_FILE} ]]; then
+ ${DIALOG} --msgbox "You do not have permission to perform this action." 0 ${DEFAULT_WIDTH}
+ exit 1
+fi
+
+rm -f ${LOCK_FILE}
+
if [[ -e ${LOCK_FILE} ]]; then
${DIALOG} --msgbox "Operation failed." 0 ${DEFAULT_WIDTH}
exit 1
else
- ${DIALOG} --msgbox "The option to create and use persistent home volumes is enabled. You should be prompted next time you start __INCOGNITO__." 0 ${DEFAULT_WIDTH}
- rm -f /home/__INCOGNITO_USER_/Desktop/enable-persistent-vol.desktop
+ ${DIALOG} --msgbox "The option to create and use persistent home volumes is enabled. The guide should start next time you boot __INCOGNITO__." 0 ${DEFAULT_WIDTH}
exit 0
fi