Bash ${var} vs "$var"

When you make a package when you can not be totally sure that the variable contents does not contain spaces you should use "$var" instead of $var or ${var}. Actually the ${var}  is only useful if need some replacement function you can read about in the man.
To see the difference in action try:
$ A="bye bye bye"; touch ${A}
and
$ A="bye bye bye"; touch "$A"
Otherwise try:
$ mkdir a\ a\ a
$ cd a\ a\ a
and inside create a PKGBUILD with this contents:
pkgname=a_a_a
pkgver=1
pkgrel=1
pkgdesc="ah ah ah"
arch=(i686 x86_64)
url=""
license=('WTFPL')
md5sums=()
build() {
cd /
cd ${startdir}/pkg
touch "testing spaces"
return 0 }
executing pkgbuild you'll see it does not work as intended. The second line does not override the first.
Instead using "$startdir" works flawlessly.
In fact the {} does nothing in this cases.
My advice is: if you are not really desperate for diskspace ALWAYS use "$VARIABLE" you can not go wrong. If you are desperate use "$VARIABLE" every time you can not be sure the variable will never contains spaces or other dividing characters (e.g. $pkgver).
Ok, flame war ON!
Edit: Little mistake fixed. But it does not change the whole meaning.
Last edited by ezzetabi (2008-09-27 18:18:34)

@ezzetabi: A valid use case for ${} without array indexing, replacement, and so on, is if you want to do:
MYVAR1="some words perhaps with space"
MYVAR2="a few words before ${MYVAR1}s but not so many"
You could find a way to do that using only "$MYVAR2" instead, but why bother?
Granted this kind of use case doesn't come up in PKGBUILDs. But I'd try to explain to people the difference between these, rather than tell them to always use one of them.
${VAR} is a way to separate the specification of your variable name from the surrounding text. For instance, you may want to say ${VAR}more_text. When the surrounding text isn't valid in a variable name (e.g., if it's spaces), then the ${} isn't needed. But it's a helpful habit to always use it anyway.
"$VAR" and "${VAR}" are ways to chunk together the values stored in VAR. If you're passing this value to a command or another variable, e.g. in:
ANOTHERVAR="$VAR"
rm -f "$VAR"
then if there's any chance that VAR has whitespace in it, you should use surrounding quotes. Otherwise here's what happens. Suppose VAR="first second". Then:
ANOTHERVAR=$VAR
rm -f $VAR
will be read as:
ANOTHERVAR=first second
rm -f first second
which means: set ANOTHERVAR to "first" and execute the command "second", and try to rm each of the files "first" and "second". There are times where that is what you want to do. But usually you'd want to do this instead:
ANOTHERVAR="first second"
rm -f "first second"
and to get that result you have to surround your $VAR (or ${VAR}) in double quotes.
Last edited by Profjim (2008-09-28 14:13:42)

Similar Messages

  • Clean install yosemite why are my var/db var/ usr/bin usr/lib files being transfered

    im doing a clean install and im wondering why /private/var/tmp, private/var/run, private/var/db, /Library preferences, are all being transfered to the new install?  plus they are all mounted like they are disks when you run diskutil list
    i tried looking it up but the only thing that comes up is server info...and this is home desktop computer

    EtreCheck version: 2.1.8 (121)
    Report generated February 10, 2015 at 3:26:50 AM CST
    Download EtreCheck from http://etresoft.com/etrecheck
    Click the [Click for support] links for help with non-Apple products.
    Click the [Click for details] links for more information about that line.
    Hardware Information: ℹ️
        iMac (24-inch, Early 2009) (Verified)
        iMac - model: iMac9,1
        1 2.66 GHz Intel Core 2 Duo CPU: 2-core
        8 GB RAM Upgradeable
            BANK 0/DIMM0
                4 GB DDR3 1067 MHz ok
            BANK 1/DIMM0
                4 GB DDR3 1067 MHz ok
        Bluetooth: Old - Handoff/Airdrop2 not supported
        Wireless:  en1: 802.11 a/b/g/n
    Video Information: ℹ️
        NVIDIA GeForce 9400 - VRAM: 256 MB
    System Software: ℹ️
        OS X 10.10.2 (14C109) - Time since boot: 1:38:8
    Disk Information: ℹ️
        Hitachi HDT721064SLA360 disk0 : (640.14 GB)
            EFI (disk0s1) <not mounted> : 210 MB
            Mac Yosemite (disk0s2) / : 639.28 GB (628.54 GB free)
            Recovery HD (disk0s3) <not mounted>  [Recovery]: 650 MB
        HL-DT-ST DVDRW  GA11N 
    USB Information: ℹ️
        Apple, Inc. Keyboard Hub
            Logitech USB Receiver
            Apple, Inc Apple Keyboard
        Apple Inc. Built-in iSight
        Apple Inc. BRCM2046 Hub
            Apple Inc. Bluetooth USB Host Controller
        Apple Computer, Inc. IR Receiver
    Gatekeeper: ℹ️
        Mac App Store and identified developers
    Problem System Launch Daemons: ℹ️
        [failed]    com.apple.ucupdate.plist
        [failed]    com.apple.watchdogd.plist [Click for details]
    User Login Items: ℹ️
        None
    Internet Plug-ins: ℹ️
        Default Browser: Version: 600 - SDK 10.10
        QuickTime Plugin: Version: 7.7.3
    3rd Party Preference Panes: ℹ️
        None
    Time Machine: ℹ️
        Time Machine not configured!
    Top Processes by CPU: ℹ️
            10%    taskgated
             7%    mdworker
             4%    launchd
             1%    WindowServer
             1%    ArpGuard
    Top Processes by Memory: ℹ️
        455 MB    softwareupdated
        163 MB    AntiVirus Sentinel Pro
        151 MB    WindowServer
        129 MB    com.apple.WebKit.WebContent
        129 MB    installd
    Virtual Memory Information: ℹ️
        3.02 GB    Free RAM
        2.92 GB    Active RAM
        1.62 GB    Inactive RAM
        764 MB    Wired RAM
        2.20 GB    Page-ins
        0 B    Page-outs
    Diagnostics Information: ℹ️
        Feb 10, 2015, 01:51:52 AM    /Library/Logs/DiagnosticReports/mbpluginhost_2015-02-10-015152_[redacted].crash
        Feb 10, 2015, 01:48:03 AM    Self test - passed
        Feb 9, 2015, 11:11:39 PM    /Library/Logs/DiagnosticReports/Setup Assistant_2015-02-09-231139_[redacted].cpu_resource.diag [Click for details]

  • Xslt Problem (var in var)

    I have an xml file that looks, like this:
    <overschrijving soort="eigenrek" kleur="">
         <veld naam="Memodatum (DD/MM/JJ)">
              <omschrijving>den datum</omschrijving>
              <type breedte="10" aantal="1" maxlength="10" typecode="1">text</type>
              <veldnaam n1="Dyl0702_MemoDt" n2="blabla"/>
              <structuur>DD-MM-JJJJ</structuur>
              <body id="1.1"/>
              <controle controle1="" />
         </veld>
    </overschrijving>
    Now I made a loop with in my xsl file (like this:)
    <xsl:template name="herhaal">
                   <xsl:param name="i" select="2"/>
                   <xsl:if test="$i > 0">
                   <input type="{type}" name="{./veldnaam/@n{$i}}" size="{./type/@breedte}" maxlength="{./type/@maxlength}"/>
              <xsl:call-template name="herhaal">
                   <xsl:with-param name="i" select="$i - 1"/>
              </xsl:call-template>
              </xsl:if>
              </xsl:template>
    my problem is this line:
    <input type="{type}" name="{./veldnaam/@n{$i}}" size="{./type/@breedte}" maxlength="{./type/@maxlength}"/>
    and especially this:
    name="{./veldnaam/@n{$i}}"
    As you can see in my xml file, veldnaam has got 2 attributes (n1 and n2).
    so in the loop I have to do it like: n(value i)
    But that won't work. How can I solve this?
    thanks in advance,
    Michael

    I solved it like this:
    <overschrijving soort="eigenrek" kleur="">
         <veld naam="Memodatum (DD/MM/JJ)">
              <omschrijving>den datum</omschrijving>
              <type breedte="10" aantal="5" maxlength="10" typecode="1">text</type>
              <veldnaam>
                   <naam nummer="1" inhoud="aaaaa"/>
                   <naam nummer="2" inhoud="bbbbb"/>
              </veldnaam>
              <structuur>DD-MM-JJJJ</structuur>
              <body id="1.1"/>
              <controle controle1="" />
         </veld>
    xsl:
    <xsl:template match="veld[./body/@id='1.1']">
              <xsl:call-template name="herhaal">
              </xsl:call-template>
              </xsl:template>
              <xsl:template name="herhaal">
              <xsl:param name="type" select="./type"/>
              <xsl:for-each select="./veldnaam/naam">
              <xsl:variable name="testg" select="@inhoud"/>
              <input type="{$type}" name="{$testg}" size="{$type/@breedte}" maxlength="{$type/@maxlength}"/>
              </xsl:for-each>
              </xsl:template>
    and now it works.
    But suppose I want to have:
    <veldnaam>
                   <naam>aaaaa</naam>
                   <naam>bbbbb</naam>
              </veldnaam>
    How do I do it then?
    with an attribute it's just @ something, but with this?
    I tried:
    <xsl:variable name="testg" select="./veldnaam/naam"/>
    and:
    <xsl:variable name="testg" select="{./veldnaam/naam}"/>
    but none of those seemed to work.
    greetings from Belgium (Brussels),
    Michael

  • /var to tmpfs

    Hey,
    I'm running arch on a tiny homeserver with an USB pen drive as root.
    Since the write cycles are limited I would like to reduce the load on the pen drive as much as possible.
    Since /var is a commonly used part of the filesystem I would like to put it in to ram.
    My thougts are, that I could add another init script which handles this:
    On boot it creates a tmpfs e.g. to /var_tmp, copies all stuff from /var to /var_tmp, and moves the tmpfs mount point from /var_tmp to /var.
    On shutdown it should do this steps in reverse order, so that no stuff gets lost.
    What do you think? How could I realise that?
    Thanks,
    Oli

    genisis300 wrote:
    do it the other way round.
    copy the contents of /var to /var_tmp
    mount tmpfs to /var
    copy back the contents.
    Or see the link above.
    what is the benefit?
    i actually do it this way:
    #!/bin/bash
    . /etc/rc.conf
    . /etc/rc.d/functions
    case "$1" in
    start)
    stat_busy "Creating /var tmpfs"
    rm -rf /tmp/var
    mkdir /tmp/var
    mount -t tmpfs tmpfs /tmp/var -o size=500M,noatime
    cp -rp /var/* /tmp/var
    mount --move /tmp/var /var
    rm -rf /tmp/var
    add_daemon vartmpfs
    stat_done
    stop)
    stat_busy "Syncing /var back"
    rm -rf /tmp/var
    mkdir /tmp/var
    mount --move /var /tmp/var
    rsync -a /tmp/var/* /var/
    umount /tmp/var
    rm -rf /tmp/var
    rm_daemon vartmpfs
    stat_done
    restart)
    $0 stop
    $0 start
    echo "usage: $0 {start|stop|restart}"
    esac
    exit 0
    what do you think?

  • Passing JavaScript Var ---- to java method....URGENT...PLEASE ...HELP

    I am doing a simple java Servlet example...
    I have value that is assigned in a one of the javascript function().
    Below i have the function where i get the columnValue....
    i want to use that value in the doPost method in my Servlet1 class...
    Can someone please tell me how i can do this...
    function getGridValue(oColumn) {
         var oRow;
         var oCell;
         var lIdx;
         var columnValue;
         try {
              lArrayLength = GridArrays.length;
              if (lArrayLength < 1) {
                   return false;
              for (lLoop=0; lLoop<lArrayLength; lLoop++) {
                   oRow = GridArrays[lLoop];
                   oCell = oRow[0];
                   columnValue = oRow[oColumn];
                   if (oCell.SortVal == 1) {
                        alert(columnValue.SortVal);
                        break;
                        return true;     
         catch(exception){
              if(exception.description == null){
                   alert("GridSerVal: " + exception.message);
              else{
                   alert("GridSetVal: " + exception.description);
    Servlet1 class
    public void doPost(HttpServletRequest request, HttpServletResponse res)
    throws IOException, ServletException
    String xParameterName = null;
    String xParameterValue = null;
    PrintWriter out = res.getWriter();
    PolicyInformation policyInformation = null;
    Enumeration e = request.getParameterNames();
    while (e.hasMoreElements()) {
    xParameterName = (String) e.nextElement();
    xParameterValue = request.getParameter(xParameterName);
    if ((xParameterValue.trim().length() !=0 )){
    if(xParameterName.compareTo("firstnameTextfield")==0){
    else if(xParameterName.compareTo("lastnameTextfield")==0){
    else if(xParameterName.compareTo("policynumberTextfield")==0){
    StringBuffer outstring = new StringBuffer();
    outstring.append(createScript.policyReCreateSearchForm(xParameterValue));
    outstring.append(createScript.setTopPart());
    outstring.append(createScript.getHeader());
    Vector policyInformationVector1 = getPolicyInformation(res, xParameterValue);
    Iterator iter = policyInformationVector1.iterator();
    PolicyInformation aPolicyInformation = null;
    while(iter.hasNext()){
    Object[] data = new String[policyInformationVector1.size()];
    for (int ii=0; ii < data.length; ii++){
    int rowNum = ii + 1;
    aPolicyInformation = (PolicyInformation) iter.next();
    f = aPolicyInformation.getFirstName();
    l = aPolicyInformation.getLastName();
    d = aPolicyInformation.getDOB();
    s = aPolicyInformation.getSSN();
    p = aPolicyInformation.getPolicyNumber();
    m = aPolicyInformation.getMiddleName();
    pid = aPolicyInformation.getPid();
    outstring.append(createScript.setRowValue(f,m,l,p,pid,d,s,rowNum));
    outstring.append(createScript.setRowValue1());
    outstring.append(createScript.getBottom());
    out.println(outstring.toString());
    else if(xParameterName.compareTo("ssnTextfield")==0){
    THis is where i want to get the value from the javascript and use that value to run a query...
    // checks if the ViewSubmitButton is submitted....
    if(xParameterName.compareTo("viewSubmitButton") == 0){
    } // end of while(e.hasMoreElements())

    I'm not quite sure what your problem is specifically, but at first glance I can tell you that you can't access the response object until you are done with your request object. Make sure you do everything you want to do with the request object and then when you are done make your call to res.getWriter() and send your output.

  • Error with report - pkg and bind var

    Hi to all,
    i'm writing some report and i found a strange isssue.
    I would like to retrieve some data using packages.
    So, something like select dbms_xxxx(var1, var2, var3) from dual;
    I would like to pass through bind vars the value per each variable.
    I used :var1 and also &var1 to be secure..
    if i use select dbms_xxxx(':var1', ':var2', ':var3') from dual;
    it gives me error about the apex, so i changed it in
    select dbms_xxxx(par1 => :var1.....
    Now it gives a problem with the parenthesis. But they are right!
    Any ideas? A possible limit of developer?
    By the way.. latest sqldev version.
    Thanks
    Acr

    Example:
    SELECT DBMS_METADATA.GET_DDL(
    object_type => upper(&object_type),
    object_name => upper(&object_name),
    schema => upper(&schema)) DDL
    FROM DUAL;
    This i what i get.
    Error: ORA-00907 MISSING RIGHT PARENTHESIS
    using &var or :var
    Acr

  • Automounting EncFS encrypted /var/tmp using pam_encfs

    I've encrypted /var/tmp using encfs and tried to set up automounting using pam_encfs, following the instructions at https://wiki.edubuntu.org/EncryptedHomeFolder, linked on the Arch Wiki. Basically, what I've done is the following:
    1. Install pam_encfs
    2. Insert the line "auth sufficient pam_encfs.so" into /etc/pam.d/login and append "use_first_pass" to every subsequent line (see below)
    3. Change the source and target in am_encfs.conf to /var/.tmp and /var/tmp, and change "allow_other" to "nonempty"
    4. Add fuse to the modules array in /etc/rc.conf
    5. Add myself to the fuse group
    6. Run "sudo encfs /var/.tmp /var/tmp" and set it up with the default options and my login password
    When I restart and login, however, /var/tmp is not mounted. I can manually mount it with "sudo encfs /var/.tmp /var/tmp".
    Here is my /etc/pam.d/login:
    #%PAM-1.0
    auth required pam_securetty.so
    auth requisite pam_nologin.so
    auth sufficient pam_encfs.so
    auth required pam_unix.so nullok use_first_pass
    auth required pam_tally.so onerr=succeed file=/var/log/faillog use_first_pass
    # use this to lockout accounts for 10 minutes after 3 failed attempts
    #auth required pam_tally.so deny=2 unlock_time=600 onerr=succeed file=/var/log/faillog
    account required pam_access.so use_first_pass
    account required pam_time.so use_first_pass
    account required pam_unix.so use_first_pass
    #password required pam_cracklib.so difok=2 minlen=8 dcredit=2 ocredit=2 retry=3
    #password required pam_unix.so sha512 shadow use_authtok
    session required pam_unix.so use_first_pass
    session required pam_env.so use_first_pass
    session required pam_motd.so use_first_pass
    session required pam_limits.so use_first_pass
    session optional pam_mail.so dir=/var/spool/mail standard use_first_pass
    session optional pam_lastlog.so use_first_pass
    session optional pam_loginuid.so use_first_pass
    -session optional pam_ck_connector.so nox11 use_first_pass
    -session optional pam_systemd.so use_first_pass
    and my /etc/security/pam_encfs.conf:
    #This file is parsed top to bottom, until the first mount line that matches is found, then it stops.
    #Note that I dont support spaces in params
    #So if your for example gonna specify idle time use --idle=X not -i X.
    #If this is specified program will attempt to drop permissions before running encfs.
    #(will not work with --public for example, as that requires encfs to run as root)
    drop_permissions
    #This specifies which options to pass to encfs for every user.
    #You can find encfs options by running encfs without any arguments
    encfs_default --idle=1
    #Same for fuse, note that allow_root (or allow_other, or --public in encfs) is needed to run gdm/X.
    #you can find fuse options with encfs -H
    fuse_default allow_root,nonempty
    #For a mount line, - = generic, we try to fill in what we need.
    #A Mount line is constructed like this:
    #USERNAME if "-" or "*" gets replaced with $USER
    #SOURCE if USERNAME is -, replace with path + /$USER
    # if USERNAME is *, replace with $HOME/ + sourcepath
    #TARGET PATH if - replace with $HOME
    # if USERNAME is *, replace with $HOME/ + targetpath
    #ENCFS OPTIONS encfs options here is encfs_default + encfs_options
    #FUSE OPTIONS encfs options here is fuse_default + fuse_options
    #Keep in mind that the configuration file is parsed top to bottom, so if you put your generic line on top,
    #that will always match before any custom lines under it.
    #In this example, with example_user uncommented, the "-" line will never be parsed if you login as example_user.
    #In the lines with the USERNAME "*", all paths are relative to $HOME
    #USERNAME SOURCE TARGET PATH ENCFS Options FUSE Options
    #example_user /mnt/enc/example_user /home/example_user -v,--idle=1 allow_root
    #* .private private -v allow_other
    - /var/.tmp /var/tmp -v,>/home/ian/log nonempty
    The ">/home/ian/log" option at the bottom was an attempt to direct the output of the command pam_encfs runs to a file, but it didn't create a log file when I tried it. If anyone knows how to do this correctly, that would probably be pretty helpful, since it's difficult to debug without knowing what's failing.
    Thanks in advance for any advice.

    I think I figured it out. It is indeed a configuration issue.
    I found a post on the internet where someone suggested putting the items I had added to /etc/pam.d/system-auth in /etc/pam.d/system-login instead. I also read the documentation for PAM linux (http://linux-pam.org/), as previously I had only been reading the documentation for pam_mount. Then, by looking at all of the files in /etc/pam.d/ I figured out what was going on.
    I turns out system-auth is just used by too many other services. In particular, I believe it was the use by the systemd-user service that was causing an issue in this case.
    The catch was that system-login is also used by systemd-user, so even that probably wouldn't have fixed the problem.
    What I ended up doing was creating a new file that contained only the pam_mount and pam_ecryptfs lines I had added to system-auth previously. Then I modified system-local-login and system-remote-login to include that new file.
    I'll also need to make some modifications to the appropriate file for the graphical login manager when I set that up.
    Marked thread solved in case this helps anyone else in the future.
    Tom
    Last edited by tom101 (2013-12-28 16:27:21)

  • Accessing components vars.

    Hi,
    How do I access a var in a differint component? I have two custom components in the same application and need to get the variable (arrayCollection) from one to populate a chart in the other.

    Thanks Benji,
    ListItems Component
    <?xml version="1.0" encoding="utf-8"?>
    <mx:Canvas xmlns:mx="http://www.adobe.com/2006/mxml" creationComplete="init(), reloadData()" height="95%" width="100%" backgroundAlpha="0">
    <mx:Script>
         <![CDATA[
              import mx.core.Application;
              import mx.collections.ArrayCollection;
              import mx.containers.Box;
              import mx.controls.Alert;
              import mx.events.DragEvent;
              import flash.net.navigateToURL;
              import mx.events.StateChangeEvent;
              import mx.controls.ComboBox;
              import mx.controls.LinkButton;
              import mx.containers.VBox;
              import mx.controls.CheckBox;
              import mx.controls.Text;
              import mx.containers.HBox;
              import mx.collections.XMLListCollection;
              import mx.rpc.events.ResultEvent;
              import mx.managers.CursorManager;
              import flash.text.TextField;
              namespace ink = "http://www.inktomi.com/";
              use namespace ink;
              //     Archive Vars
              [Bindable] private var xmlList:XMLList;
              [Bindable] private var listCollection:XMLListCollection;
              [Bindable] private var listData:XML;
              [Bindable] public var serviceURL:String = "http://boss.yahooapis.com/ysearch/news/v1/";
              [Bindable] public var searchFor:String = "biotechnology%20AND%20biotech";  
              private const PROXY:String = "http://localhost/employeePhoneDesktop/src/php/proxy.php?url=";
              private const APIID:String = "?appid=######
              private const PARAMS:String = "&format=xml&orderby=date";
              private var reload:Timer;
              //     Archive Vars
              private var vBox:VBox;
              private var hBox:HBox;
              private var titleText:LinkButton;
              private var itemInfo:Text;
              private var abstract:Text;
              private var archive:CheckBox;
              private var rateItem:ComboBox;
              private var category:ComboBox;
              private var container:VBox;
              private var clickURL:Text;
              private var canvas:Canvas;
              private var titleFormat:TextFormat;
              //     Archive Vars
              /*[Bindable]
              public var newsDB:ArrayCollection = new ArrayCollection( [
                     { title: null, clickURL: null, info: null, abstract: null, category: null, rateItem: null }
             public var newsDB:ArrayCollection = new ArrayCollection;
              private function init():void {
                   listService.send()
                   CursorManager.setBusyCursor();
              private function getData(e:TimerEvent):void{
                   listService.send()
                   CursorManager.setBusyCursor();
                   removeChild(container);
              private function reloadData():void {
                   reload = new Timer(10000, 10);
                   //reload.start();
                   reload.addEventListener(TimerEvent.TIMER, getData);
                   //trace(reload.delay);
                   //reload.addEventListener(TimerEvent.TIMER_COMPLETE,
              private function resultHandler(e:ResultEvent):void {
                   listData = e.result as XML;
                   // add the imems to an XMLList and XMLListCollection
                   // so that they can be used with the repeater class
                   // and update automatically
                   xmlList = e.result.resultset_news.result as XMLList;
                   listCollection = new XMLListCollection(xmlList);
                   CursorManager.removeBusyCursor();
                   // populate the layout with datd
                   createLayout();
              private function createLayout():void {
                   container = new VBox();
                   var categoryLabels:Array = new Array("Health","Industrial","Emerging Tech","Food & Ag");
                   var rateLabels:Array = new Array("Positive","Neutral","Negative");
                   for(var i:int=0; i<listCollection.length; i++) {
                        //vBox = new VBox();
                        canvas = new Canvas();
                        hBox = new HBox();
                        titleText = new LinkButton();
                        titleFormat = new TextFormat();
                        itemInfo = new Text();
                        abstract = new Text();
                        archive = new CheckBox();
                        rateItem = new ComboBox();
                        category = new ComboBox();
                        clickURL = new Text();
                        titleText.label = listCollection.getItemAt(i).title;
                        //titleText.addEventListener(MouseEvent.DOUBLE_CLICK, getURL);
                        titleText.addEventListener(MouseEvent.CLICK, getURL);
                        titleText.width = 400;
                        clickURL.text = listCollection.getItemAt(i).clickurl;
                        clickURL.visible = false;
                        clickURL.includeInLayout = false;
                        itemInfo.text = listCollection.getItemAt(i).source + " | " + listCollection.getItemAt(i).date;
                        itemInfo.y = 25;
                        abstract.text = listCollection.getItemAt(i).abstract;
                        abstract.y = 42;
                        abstract.visible = true;
                        abstract.includeInLayout = true;
                        abstract.width = 400;
                        abstract.height= 60;;
                        archive.label = "Archive";
                        category.prompt = "Category";
                        category.dataProvider = categoryLabels;
                        category.rowCount = categoryLabels.length;
                        category.visible = false;
                        category.includeInLayout = false;
                        category.width = 95;
                        category.height = 20;
                        rateItem.prompt = "Rate";
                        rateItem.dataProvider = rateLabels;
                        rateItem.visible = false;
                        rateItem.includeInLayout = false;
                        rateItem.width = 95;
                        rateItem.height = 20;
                        canvas.addChild(titleText);
                        canvas.addChild(clickURL);
                        canvas.addChild(itemInfo);
                        canvas.addChild(abstract);
                        canvas.addChild(hBox);
                        hBox.addChild(archive);     
                        hBox.addChild(category);
                        hBox.addChild(rateItem);
                        hBox.y = abstract.y + 60;
                        hBox.percentWidth = 80;
                        hBox.percentHeight = 80;
                        archive.addEventListener(Event.CHANGE, toggleArchive);     
                        container.addChild(canvas);          
                   container.x = 10;
                   container.y = 10;
                   addChild(container);
       // If someone chooses to archive the item, set the properties of the
       // ComboBoxes (visible & includeInLayout) to true
       private function toggleArchive(e:Event):void {
             var chb:CheckBox = e.currentTarget as CheckBox;
             var hBox:HBox = chb.parent as HBox;
             var len:int = hBox.numChildren;
             for(var i:int=0; i<len; i++) {
                   var cb:DisplayObject = hBox.getChildAt(i);
                   if((cb is ComboBox)) {
                    // toogle visibility and include in layout
                    (cb as ComboBox).visible = chb.selected;
                    (cb as ComboBox).includeInLayout = chb.selected;
       // Called when someone clicks on the titleLink. This function pulls the
       // origional website URL up in a seperate browser window
       private function getURL(e:MouseEvent):void {
                 var link:LinkButton = e.currentTarget as LinkButton;
                 var canvas:Canvas = link.parent as Canvas;
                 var clickURL:Text = canvas.getChildAt(1) as Text;
                 var url:URLRequest = new URLRequest(clickURL.text);
                 navigateToURL(url);
              trace(clickURL.text);
      /* private function showAbstract(e:MouseEvent):void {
                    var link:LinkButton = e.currentTarget as LinkButton;
                 var canvas:Canvas = link.parent as Canvas;
                 var abstract:Text = canvas.getChildAt(3) as Text;
                 var hBox:HBox = canvas.getChildAt(4) as HBox;
                 link.removeEventListener(MouseEvent.CLICK, showAbstract);
                 link.addEventListener(MouseEvent.CLICK, hideAbstract);
                 abstract.visible = true;
                 abstract.includeInLayout = true;
                 while(abstract.hitTestObject(hBox) == true){
                      hBox.y += 1;
                 trace(canvas.getChildren());
       private function hideAbstract(e:MouseEvent):void {
                    var link:LinkButton = e.currentTarget as LinkButton;
                 var canvas:Canvas = link.parent as Canvas;
                 var abstract:Text = canvas.getChildAt(3) as Text;
                 var hBox:HBox = canvas.getChildAt(4) as HBox;
                 link.removeEventListener(MouseEvent.CLICK, hideAbstract);
                 link.addEventListener(MouseEvent.CLICK, showAbstract);
                 abstract.visible = false;
                 abstract.includeInLayout = false;
              hBox.y = 35;
                 trace(abstract.text);
       public function archiveData():void {
                 var containerArray:Array = container.getChildren() as Array;
                 for(var i:int=0;i<containerArray.length;i++){
                 //for(var i:int=0;i<1;i++){
                      var canvas:Canvas = container.getChildAt(i) as Canvas;
                      var titleText:LinkButton = canvas.getChildAt(0) as LinkButton;
                      var clickURL:Text = canvas.getChildAt(1) as Text;
                      var itemInfo:Text = canvas.getChildAt(2) as Text;
                      var abstract:Text = canvas.getChildAt(3) as Text;
                      var hBox:HBox = canvas.getChildAt(4) as HBox;
                      var archive:CheckBox = hBox.getChildAt(0) as CheckBox;
                      var category:ComboBox = hBox.getChildAt(1) as ComboBox;
                      var rateItem:ComboBox = hBox.getChildAt(2) as ComboBox;     
                      if(archive.selected == true){
                        newsDB.addItem( {
                        title: titleText.label,
                        clickURL: clickURL.text,
                        info: itemInfo.text,
                        abstract: abstract.text,
                        category: category.selectedLabel,
                        rateItem: rateItem.selectedItem });                    
                      trace(newsDB[0].title);
       private function archiveSuccess():void {
                 Alert.show("Your clips have been successfully saved","Archive Complete");        
       private function archiveFault():void {
                 Alert.show("Your clips have not been saved. Please contact an administrator.","Archive Error");
         ]]>
    </mx:Script>
         <mx:HTTPService id="listService" url="{serviceURL + searchFor + APIID + PARAMS}" result="resultHandler(event)" resultFormat="e4x"/>
    </mx:Canvas>
    Main mxml
    <?xml version="1.0" encoding="utf-8"?>
    <mx:WindowedApplication xmlns:mx="http://www.adobe.com/2006/mxml"
         layout="absolute"
         xmlns:com="components.*"
         backgroundGradientAlphas="[1.0, 1.0]"
         backgroundGradientColors="[#EDF4FF, #C6D9FF]"
         width="800" height="600"
         backgroundAlpha=".75"
         title="  Media Trap Beta V1.1"
         titleAlignment="left"
         creationComplete="init()">
         <mx:Script>
              <![CDATA[
              ]]>
         </mx:Script>
         <mx:Style source="assets/style.css" />
         <mx:Label x="19" y="14" text="Media Trap" fontWeight="bold" fontSize="20"/>
         <mx:Label x="20" y="38" text="beta 1.1"/>
         <mx:TabNavigator id="navigator" width="450" height="89%"  x="20" y="61">
              <mx:VBox label="News">
                   <com:listItems id="newsFeed" name="newsFeed" backgroundColor="#FFFFFF" x="0" y="0" height="100%">
                   </com:listItems>
              </mx:VBox>
              <mx:VBox label="Blogs">
                   <mx:Text text="Blog Coverage"/>
              </mx:VBox>
              <mx:VBox label="Twitter">
                   <mx:Text text="Twitter Coverage"/>
              </mx:VBox>
              <mx:VBox label="Video">
                   <mx:Text text="Video Coverage"/>
              </mx:VBox>
         </mx:TabNavigator>
         <mx:Button x="348" y="36" label="Archive Selected" click="newsFeed.archiveData()"/>
         <!--<com:currentArchiveChart id="currentCats" x="478" y="81" height="212" />-->
    </mx:WindowedApplication>
    Charting Component
    <?xml version="1.0" encoding="utf-8"?>
    <mx:Canvas xmlns:mx="http://www.adobe.com/2006/mxml" width="300" height="346" xmlns:com="components.*" creationComplete="init()" >
        <mx:Script>
            <![CDATA[
            import mx.core.Application;
            import mx.collections.ArrayCollection;
              // testing variable
            [Bindable]
            private var medalsAC:ArrayCollection = new ArrayCollection( [
                { Country: "USA", Gold: 35, Silver:39, Bronze: 29, Test: 20000 }
            private function init():void{
                 trace(mx.core.Application.application.myListItems.newsDB as ArrayCollection);
                 medalsAC.addItem( { Country: "Canada", Gold: 75, Silver:39, Bronze: 29 });
                 medalsAC.addItem( { Country: "England", Gold: 100, Silver: 200, Bronze: 100 });
            private function displayGold(data:Object, field:String, index:Number, percentValue:Number):String {
                var temp:String= (" " + percentValue).substr(0,6);
                return data.Country + ": " + '\n' + "Total Gold: " + data.Gold + '\n' + temp + "%";
            ]]>
        </mx:Script>
             <mx:Label id="archiveTitle" x="10" y="10" text="Current Archive " fontSize="14" fontWeight="bold"/>
             <mx:PieChart id="chart" height="130" width="300" color="0x323232"
                showDataTips="false" dataProvider="{medalsAC}"  y="22">
                <mx:series>
                    <mx:PieSeries labelPosition="callout" field="Gold">
                    </mx:PieSeries>
                </mx:series>
            </mx:PieChart>
    </mx:Canvas>

  • [SOLVED] Arch won't boot after I created a separate /var parition

    Arch won't boot after I created a separate /var parition on an existing installation.And let me confess: it was maybe stupid trying to do it on an existing install.
    I edited the fstab correctly, copied the files using rsync preserving permissions. Then I kept a backup of /var using tar. Then went on to delete everything under /var, ie /var/*, the /var folder is still there. All this I did from a live CD. After that I booted into my arch linux. Here I get messages about systemd successfully finishing fsck on each of my partitions, then the screen starts blinking. And there is no more output. Pressing Ctrl+Alt+Delete causes systemd to stop its services and reboot.
    Having realized I had borked my system, I removed the /var line from fstab and restored /var from the tar file I made earlier. Again I did this from a live cd. Rebooted into my arch system, and again similar issues, namely that after fsck and messages informing a few services had started, the screen keeps blinking.
    The live cd I used for reorganizing my partitions was elementary OS freya. They have GParted in there. I also have an arch install iso lying aroung from May 2013. If necessary, I can download the latest version. I am currently typing from a Windows installation I dual boot from.
    I don't know how to extract any boot logs as I am locked out of the system. Here is my fstab in any case:
    # Filesystem information
    # /dev/sda5 LABEL=fs_root
    UUID=b9d739cf-fd8c-46dd-a919-bd827dc47c66 / ext4 rw,noatime,data=ordered 0 1
    # /dev/sda9 LABEL=fs_var
    UUID=ec0f7a49-dccd-43ab-8651-9aa3fdb41cc7 /var ext4 rw,noatime,data=ordered 0 2
    # /dev/sda2 LABEL=fs_boot
    UUID=0e8ab31a-3bda-4b85-a901-a36f21b1583d /boot ext2 rw,noatime 0 2
    # /dev/sda6 LABEL=fs_home
    UUID=d9e63c47-274e-447f-ad01-0d97afe0fd34 /home ext4 rw,noatime,data=ordered 0 2
    # /dev/sda7 LABEL=fs_swap
    UUID=7301227c-e9f3-41b8-9d0f-4cf3c159491c none swap defaults 0 0
    # /dev/sda3 LABEL=fs_win
    UUID=12B639D1B639B5D7 /fs_win ntfs uid=1000,gid=1000,dmask=027,fmask=137,showexec,nofail,noauto,x-systemd.automount 0 0
    # /dev/sda3 LABEL=fs_share
    UUID=D272269772268079 /fs_share ntfs uid=1000,gid=1000,dmask=027,fmask=137,showexec,noauto,nofail,x-systemd.automount 0 0
    I would greatly appreciate any help.
    Last edited by richcocoa (2015-05-03 18:04:44)

    Have you moved everything from /var to /new_var (i named it for learning purpose)? You shoud copy content from /var but not on the fly but booting from arch iso cd, and than you shoud mount your / into arch-chroot environement, mount all of your mount points and than copy content from default /var to new /var. The copying should be done with this
    cp -rax
    and you can add -v switch to verbose output. I have my own /var moved the same way.
    The simples way is:
    -boot the arch iso cd
    -mount all of your mount point (i created here in this step /new_var to move /var to a new place, and this /new_var i put in /etc/fstab as /var later)
    -copy /var to /new_var with -rax or -vrax (recursive, archive, this filesystem or verbose, recursive, archive, this filesystem switches)
    -umount all of it
    -reboot.
    Last edited by firekage (2015-05-02 07:49:20)

  • Is There any difference in Set @Var=ColmnName and Select @Var =Column from Table. I am using it in SSIs for Dynamic Packages

    hey there, Kindly elaborate me the difference Between Set and Select clause while Providing value to a Variable or Even  a  Column.
        Declare @var nvarchar(Max)
        Set @var= (Select TestName+ cAst(TestId as nvarchar) from TblTest where TestID=1)
        Insert into TblTest(TestName)
        Values (@var)
        Declare @var nvarchar(Max)
        Select @var= (Select TestNAme + Cast(TestId as Nvarchar(MAx)) from TblTest Where TestID=1)
        Insert into TblTest(TestName)
        Values(@var)
    Values and result I am getting is Same in Both.
    But just wondering if there is any Difference. and if Any which Should I prefer.
    And Which one uses less Resources.

    I like this article
    http://vyaskn.tripod.com/differences_between_set_and_select.htm
    Best Regards,Uri Dimant SQL Server MVP,
    http://sqlblog.com/blogs/uri_dimant/
    MS SQL optimization: MS SQL Development and Optimization
    MS SQL Consulting:
    Large scale of database and data cleansing
    Remote DBA Services:
    Improves MS SQL Database Performance
    SQL Server Integration Services:
    Business Intelligence

  • Resource Bundle var unknown in task flow

    Hello everyone,
    I'm using a resource bundle in my web-app. This is the entry in the faces-config.xml file:
    <resource-bundle>
          <base-name>oracle.bundles.CustomUIBundle</base-name>
          <var>bundle</var>
    </resource-bundle>
    When I use the EL expression in my jsf fragments like #{bundle['key']} I have no error or warning messages, but when I use it in a train stop label in a Task Flow with train I have the following error and warning messages:
    Error: EL token "bundle" is unknown
    Warning: Reference "bundle" not found
    The labels are correctly shown at runtime, but this error make me unconfortable during the developing because I cannot know immediately if a "real" error is present.
    Thanks in advance.
    Manuel

    Timo,
    sorry for my forgetfulness: JDev 11.1.2.3.0.
    I know that it works fine at runtime but is a bit frustrating to see that big red cross on the task flow views even though the code is correct. That's all.
    Anyway, thanks for your help.
    Manuel

  • LMS 3.2 - restorebackup.pl issues with /var permissions on Solaris 10

    Hi,
    I have been attempting a restore using the restorebackup.pl script but it was repeatedly failing 70% of the way through the RME restore.
    I discovered that the script was changing the directory permissions for /var and /var/adm from root:sys 755 to root:root 700 causing the restart of daemons to fail because of denied permissions.
    What could be causing this change in permissions to /var and /var/adm to occur? Is it an error with the script?
    I was able to successfully restore using the restorebackup.pl script after changing the /var and /var/adm permissions back to root:sys 755 BUT only after the restorebackup script had changed them to root:root 700 during execution.
    The failed log is attached.

    There is no where in the restore code where anything is explicitly chmod'd to 0700.  In fact, the RME restore code will attempt to preserve ownership of /var and /var/adm.  Perhaps the permissions in your RME filebackup.tar file are already 0700 for /var and /var/adm?

  • Declaring var, changing the name

    I have an myArray created from list of master pageItems:
    myDoc.masterSpreads[0].pageItems.everyItem().name.sort());
    I am going to use every of this Array element in my dialog as a
    checkboxControls.add ({staticLabel: myArray[k]});
    At the same time I should declare a variables which will keep user checkedState:  .
    So thats should be myChck_1, myChck_2, ... myChck_n,  - depends on myArray.length - declared.
    How can I declare variables with names changing with counter "k" value?
    Thx

    Let's try to make it clear.
    Given an array of strings—say myNames—the goal is to associate a control (here a checkbox) to each string.
    The first stage is to create each control within the UI container. This can be done easily, as illustrated in the original post:
    // myNames is an array of strings
    var i;
    for( i=0 ; i < myNames.length ; ++i )
       myCheckboxControls.add({ staticLabel: myNames[i] });
    The above code produces the corresponding control objects—instances of CheckboxControl—but it does not provide a convenient way to access these objects using the original index (in myNames). What the author needs is to keep a reference to each control and to have access to each reference the same way he loops through myNames (i.e., by index). Hence, the ideal structure for this is another array.
    The point is that the CheckboxControls.add(...) method returns a reference to the CheckboxControl object  it just created. You can store this reference in a variable, or directly within your destination array.
    In JavaScript, arrays basically behave as regular objects in that you can fill them 'on the fly' using an integer—the index—in the role of the property name. We can therefore develop the initial code as follows:
    // myNames is an array of strings
    var i;
    var destArray = []; // declare an empty Array
    for( i=0 ; i < myNames.length ; ++i )
       destArray[i] = myCheckboxControls.add({ staticLabel: myNames[i] });
    The only improvement is that the reference to each newly created control is registered in destArray.
    > How does one loop through the new array for the names while also looping through the checkbox array?
    In fact, the code loops through an existing array (myNames), builds for each index a control based on myNames[i] and stores the corresponding reference in destArray using the same index. The resulting array is gradually filled during the loop. and the correspondence between destArray and myNames is maintained through a common index.
    Now, given a specific index, k, one can easily access to both the corresponding label (myNames[k]) and the corresponding control state: destArray[k].checkedState.
    @+
    Marc

  • Etc,tmp, and var folder won't hide in Leopard

    Hi can someone help me hide the etc,tmp,and var folder in Leopard 10.5.4
    I have run the ls -alO / (in terminal)
    I get these results:
    total 41517
    drwxrwxr-t 34 root admin - 1224 Jul 5 11:34 .
    drwxrwxr-t 34 root admin - 1224 Jul 5 11:34 ..
    -rw-rw-r--@ 1 Robert admin hidden 15364 Jul 5 12:31 .DS_Store
    drwx------ 3 root admin - 102 Jun 4 09:32 .Spotlight-V100
    d-wx-wx-wt 2 root staff - 68 Jun 4 09:02 .Trashes
    -rw-r--r-- 1 root admin - 0 Jun 4 09:32 .com.apple.timemachine.supported
    drwx------ 19 root admin - 646 Jul 5 12:08 .fseventsd
    -rw-r--r-- 1 Robert admin - 166 Jul 5 12:26 .hidden
    -rw------- 1 root wheel hidden 131072 Jun 30 03:51 .hotfiles.btree
    drwxr-xr-x 2 root wheel - 68 Sep 24 2007 .vol
    drwxrwxr-x+ 104 root admin - 3536 Jul 5 11:26 Applications
    -rw-r--r--@ 1 root admin hidden 44544 Jul 3 17:05 Desktop DB
    -rw-r--r--@ 1 root admin hidden 2 Jun 4 21:23 Desktop DF
    drwxrwxr-x 3 root admin - 102 Jun 4 19:37 Developer
    drwxrwxr-t+ 58 root admin - 1972 Jun 30 00:20 Library
    drwxr-xr-x 2 root wheel - 68 Sep 23 2007 Network
    drwxr-xr-x 4 root wheel - 136 Jun 4 19:26 System
    drwxr-xr-x 5 root admin - 170 Jun 27 01:40 Users
    drwxrwxrwt@ 7 root admin hidden 238 Jul 5 12:09 Volumes
    drwxr-xr-x@ 40 root wheel hidden 1360 Jun 4 19:23 bin
    drwxrwxr-t@ 2 root admin hidden 68 Sep 23 2007 cores
    dr-xr-xr-x 2 root wheel - 512 Jul 5 12:08 dev
    lrwxr-xr-x 1 root admin - 11 Jun 4 09:04 etc -> private/etc
    dr-xr-xr-x 2 root wheel - 1 Jul 5 12:08 home
    -rw-r--r--@ 1 root wheel hidden 10293308 Jun 9 19:37 mach_kernel
    -rw-r--r--@ 1 root wheel hidden 10742313 Jun 9 19:37 mach_kernel.ctfsys
    dr-xr-xr-x 2 root wheel - 1 Jul 5 12:08 net
    drwxr-xr-x@ 7 root wheel hidden 238 Jun 7 19:43 private
    drwxr-xr-x@ 66 root wheel hidden 2244 Jun 4 19:23 sbin
    lrwxr-xr-x 1 root admin - 11 Jun 4 09:04 tmp -> private/tmp
    drwxr-xr-x@ 11 root wheel hidden 374 Jun 30 00:16 usr
    lrwxr-xr-x 1 root admin - 11 Jun 4 09:04 var -> private/var
    As you can see...
    private/var
    private/tmp
    private/etc
    do not have the hidden flag. I have tried to run this command with no luck on all 3:
    sudo chflags hidden /private/var
    sudo chflags hidden /private/tmp
    sudo chflags hidden /private/etc
    No luck. I put in my password and restart the finder/cpu and these folders still remain visible. Anyone have any suggestions?

    *Hi Tim. Looks like I do have the developer tools but for some reason maybe not that one tool. So I downloaded your file (thank you so much for allowing me to download it and for uploading it) and put it on my desktop as you suggested. Still no luck. The files still appear eventhough the commands went through.*
    *See below (my terminal window afterwards)*
    roberts-imac:~ Robert$ sudo ~/Desktop/SetFile -a V /private/tmp
    roberts-imac:~ Robert$ sudo ~/Desktop/SetFile -a V /private/etc
    roberts-imac:~ Robert$ sudo ~/Desktop/SetFile -a V /private/var
    roberts-imac:~ Robert$ ls -alO /
    total 41517
    drwxrwxr-t 34 root admin - 1224 Jul 5 11:34 .
    drwxrwxr-t 34 root admin - 1224 Jul 5 11:34 ..
    -rw-rw-r--@ 1 Robert admin hidden 15364 Jul 5 18:43 .DS_Store
    drwx------ 3 root admin - 102 Jun 4 09:32 .Spotlight-V100
    d-wx-wx-wt 2 root staff - 68 Jun 4 09:02 .Trashes
    -rw-r--r-- 1 root admin - 0 Jun 4 09:32 .com.apple.timemachine.supported
    drwx------ 25 root admin - 850 Jul 5 15:22 .fseventsd
    -rw-r--r-- 1 Robert admin - 166 Jul 5 12:26 .hidden
    -rw------- 1 root wheel hidden 131072 Jun 30 03:51 .hotfiles.btree
    drwxr-xr-x 2 root wheel - 68 Sep 24 2007 .vol
    drwxrwxr-x+ 105 root admin - 3570 Jul 5 15:21 Applications
    -rw-r--r--@ 1 root admin hidden 44544 Jul 3 17:05 Desktop DB
    -rw-r--r--@ 1 root admin hidden 2 Jun 4 21:23 Desktop DF
    drwxrwxr-x 3 root admin - 102 Jun 4 19:37 Developer
    drwxrwxr-t+ 58 root admin - 1972 Jun 30 00:20 Library
    drwxr-xr-x 2 root wheel - 68 Sep 23 2007 Network
    drwxr-xr-x 4 root wheel - 136 Jun 4 19:26 System
    drwxr-xr-x 5 root admin - 170 Jun 27 01:40 Users
    drwxrwxrwt@7 root admin hidden 238 Jul 5 15:23 Volumes
    drwxr-xr-x@ 40 root wheel hidden 1360 Jun 4 19:23 bin
    drwxrwxr-t@ 2 root admin hidden 68 Sep 23 2007 cores
    dr-xr-xr-x 2 root wheel - 512 Jul 5 14:51 dev
    lrwxr-xr-x 1 root admin - 11 Jun 4 09:04 etc -> private/etc
    dr-xr-xr-x 2 root wheel - 1 Jul 5 14:52 home
    -rw-r--r--@ 1 root wheel hidden 10293308 Jun 9 19:37 mach_kernel
    -rw-r--r--@ 1 root wheel hidden 10742313 Jun 9 19:37 mach_kernel.ctfsys
    dr-xr-xr-x 2 root wheel - 1 Jul 5 14:52 net
    drwxr-xr-x@ 7 root wheel hidden 238 Jun 7 19:43 private
    drwxr-xr-x@ 66 root wheel hidden 2244 Jun 4 19:23 sbin
    lrwxr-xr-x 1 root admin - 11 Jun 4 09:04 tmp -> private/tmp
    drwxr-xr-x@ 11 root wheel hidden 374 Jun 30 00:16 usr
    lrwxr-xr-x 1 root admin - 11 Jun 4 09:04 var -> private/var
    *For some reason the entries below do not change:*
    lrwxr-xr-x 1 root admin - 11 Jun 4 09:04 etc -> private/etc
    lrwxr-xr-x 1 root admin - 11 Jun 4 09:04 tmp -> private/tmp
    lrwxr-xr-x 1 root admin - 11 Jun 4 09:04 var -> private/var
    *I've noticed that the folders that are hidden start with an "l" and the others start with a "d". (example below)*
    lrwxr-xr-x 1 root admin - 11 Jun 4 09:04 var -> private/var (example 1)
    drwxr-xr-x@ 11 root wheel hidden 374 Jun 30 00:16 usr (example 2)
    *Any other guesses??? Appreciate your help on this.*
    Does that have something to do with it?

  • No uninitialized partition for /var but I went on anyways

    In case anyone makes the same mistake as I did and added the old /var volume back into the new 1.1 VM, this is how you fix it if you told it to keep the /var on the root partition:
    (You can do all of this while the VM is running, at least on VMWare)
    - Remove old /var disk.
    - Create a new disk for the /var volume.
    - Log in to the console as root (not ssh)
    What you need to know at this point:
    When looking at the device nodes for the virtual disks, 0:0 will be /dev/sda, 0:1 will be /dev/sdb and 0:2 will be /dev/sdc.
    The order for devices will be 2:1, where the lowest number is always /dev/sda, which tends to be 0:0, so 0:0 (sda) 0:1 (sdb) 1:0 (sdc), the first number is the controller number and the 2nd the disk number.
    You can *probably* also check the 'dmsg' output and the new drive will be at the bottom.
    Replace 'sdc' with your var drive identifier.
    As root:
    # fdisk /dev/sdc
    Type p just to check if there are no partitions on the drive and you picked the right one.
    Type n to create a new partition, make it a primary partition with nr 1, accept the default values and it should work.
    exit fdisk by typing w (save and quit)
    Now we need to format the new partition:
    # mkfs.ext3 /dev/sdc1
    (could also make it ext4 but everything else seems to be ext3)
    Now comes the trickery to change the var folder around with a mount point.
    First we switch to runlevel 1.
    # init 1
    This will stop most of the services and it will ask for a root pw.
    Now we mount the new drive and copy everything over, move the old var out of the way and mount the new drive in its place.
    # mkdir /mnt/var
    # mount /dev/sdc1 /mnt/var
    # cd /var
    # cp -ax * /mnt/var
    # cd /
    # mv var var.old
    # mkdir /var
    # umount /mnt/var
    # mount /dev/sdc1 /var
    # ll /var (just to check)
    # vi /etc/fstab (or whichever editor you're comfortable with)
    Obviously we want to mount the volume again on reboot, so add the following line to your fstab:
    /dev/sdc1 /var ext3 rw 0 0
    Save and exit and reboot the appliance and you're done.
    Obviously it's better to add the new disk *before* starting the vm for the first time but I missed that part in the documentation :-)
    Hope this'll help someone else.

    If you only deleted the device from the page (an did not wipe/erase it) it will reappear if it connects to the internet before the person restored it or tyrned off the Find feature. See:
    http://support.apple.com/kb/TS4006

Maybe you are looking for

  • A better way to cut threading between paragraphs

    I would like to see a better, easier way to 'sever' the linked threads of text between flowed text frames. for example: I have one story that is 'threaded' through four frames. I want to have each of the four frames be the same text, but not threaded

  • Using TOPN reports in OBIEE 11g

    Hi , I am displaying TOP 4 products (dimension) with highest revenue (measure) in a bar chart . Used TOPN function in the revenue column . But, while displaying 4 bars , the top most product (ranked 1) bar is displayed with data but without any level

  • I have A large avi file but cant burn it in idvd

    So i have an avi movie file, 802mb. I want to be able to burn this to a dvd and have it play in any dvd player. I really dont care about titles and such. Every time i open idvd i drag the movie under the menu then it says, "+Your project exceeds the

  • DNS working intermittently for non-domain joined machines

    I have a small single Server 2012 based network, with about 90% windows clients.  DNS is running on the Windows Server 2008 machine, but DHCP is provided via a unix based firewall machine.  Within the DNS configuration I have all of my windows client

  • Help getting AVI files into PE12

    I have AVI videos from some cheap Hitachi HD cameras which won't load in PE12. The files load as just audio, but play back fine on the computer. I've read the various threads on similar issues but haven't found a good work around yet. GSpot shows the