[Thinstation-developer] TS2.0 and storage...
Brought to you by:
doncuppjr
From: Paolo S. <pao...@xv...> - 2004-04-28 16:37:36
|
Hi Miles, Troubles with storage... :o( I'm trying to prepare the prebuilt CD, but I've found that things reguarding persistent storage have been thought differently from what I need for CD prebuilt. I know that this is my fault, as in the last times I've had too little time to follow developments... Now, profile_setup do a ls -s $STORAGE_PATH/thinstation.$PREFIX /tmp/profile This isn't nice for prebult-cd, because: - the floppy can't be write-protected - the floppy is filled with tens of files the user doesn't expect - the floppy is accessed a lot of time, often for write-access, probably leading to a short life-time What I need is simply something that COPY my single conf file in /tmp/profile and stop. I also need more than one path to be checked for a thinstation.conf.user file... as the file could be in the floppy, in the usbkey or in the cdrom... so I can for example distribute one simgle ISO that can read his conf from floppy (useful for testing purposes) or from cdrom (when a sysadmin want to use the prebuilt ISO in a production environment, it would probably like to be able to edit the ISO with Nero, and to include the thinstation.conf.user file directly inside the CD...so the floppy isn't needed anymore) So I concluded that the right solution isn't to force "permanent storage" to work in the way I want, but simply to add a simple, additional system, that would use some params like: CONF_SRC0=/mnt/floppy/thinstation.conf.user CONF_SRC1=/mnt/cdrom/thinstation.conf.user CONF_SRC2=/mnt/usbdevice/lun0/part0/thinstation.conf.user CONF_SRC3=/mnt/disc0/part1/thinstation.conf.user this is how I patched local_storage to get it done: ------------------------------------------------------------------ #! /bin/sh . $TS_GLOBAL case "$1" in init) if ! pkg_initialized $PACKAGE; then if [ ! -z "$STORAGE_PATH" ] ; then if [ -e $STORAGE_PATH ] ; then if [ ! -e $STORAGE_PATH/thinstation.$PREFIX ] ; then if ! mkdir $STORAGE_PATH/thinstation.$PREFIX ; then echo "Error setting up profile!" >> $CONSOLE echo "Make sure the path to your profile directory" >> $CONSOLE echo "$STORAGE_PATH/thinstation.$PREFIX folder is writable and exists." >> $CONSOLE echo "Aborting Bootup and starting shell." >> $CONSOLE ash fi fi ln -s $STORAGE_PATH/thinstation.$PREFIX /tmp/profile fi else mkdir /tmp/profile fi # --- Start of the patch ------------------------------ if [ -e "$CONF_SRC0" ] ; then cat $CONF_SRC0 >> $TS_USER 2> /dev/null echo >> $TS_USER cleanup fi if [ -e "$CONF_SRC1" ] ; then cat $CONF_SRC1 >> $TS_USER 2> /dev/null echo >> $TS_USER cleanup fi if [ -e "$CONF_SRC2" ] ; then cat $CONF_SRC2 >> $TS_USER 2> /dev/null echo >> $TS_USER cleanup fi if [ -e "$CONF_SRC3" ] ; then cat $CONF_SRC3 >> $TS_USER 2> /dev/null echo >> $TS_USER cleanup fi # --- End of the patch ------------------------------ pkg_set_init_flag $PACKAGE fi ;; help) echo "Usage: $0 init" ;; *) exit 1 ;; esac exit 0 ------------------------------------------------------------------ You should also add, in thinstation.conf.buildtime, after the STORAGE section, another section: ------------------------------------------------------------------ # --- Load configuration from premnent storage # # CONF_SRC[0-3] Pathname where a thinstation conf file is loaded from #CONF_SRC0=/mnt/floppy/thinstation.conf.user #CONF_SRC1=/mnt/cdrom/thinstation.conf.user #CONF_SRC2=/mnt/disc1/part1/thinstation.profile/thinstation.conf.user #CONF_SRC3=/mnt/usbdevice/lun0/part1/thinstation.profile/thinstation.conf.user ------------------------------------------------------------------ I've tested it, and it seems to work well.... anyway, if someone doesn't use it, it won't do any damage (an important thing, when adding a feature in a nearly-ready-to-be-officially-released version) ...Another problem: On a PC of mine, the USB-key partition is mounted on this path: /mnt/usbdevice/IntelligentStickIntelligentStick.0.part1 This seems a very strange path to me... A note: this PC already have two IDE HD, mapped as /mnt/disk0 and as /mnt/disk1 on an eBox, a thinclient that have only a single 64Mb flashdisk, the usb-key is mounted on a more reasonable path: /mnt/disc1/part1 BTW, a different path from the /mnt/usbdevice/lunX/partX I expected... I've attached the configuration file I'm using Let me know, and bye! Paolo |