XBMC-standalone config files location [solved]

My HTPC seems to have corrupted one of the XBMC config files (probably the library) and now it doesn't seem to be able to add any videos (even with .nfo files) to the library (and it has lost quite a lot of videos that were already there).
I've looked everywhere to try and delete the config files however I can't seem to find where they are when XBMC is started using systemctl (I thought I'd struck gold with "/usr/share/xbmc/system/" however deleting them didn't help).
So far I've tried removing and re-installing XBMC and deleting /usr/share/xbmc/system (which is removed when uninstalling XBMC) and it doesn't seem to have reset configuration is there anywhere else I should look?
Thanks for the help.
Last edited by Aradreth (2013-10-19 12:32:48)

There is no XBMC folder in any of the users under /home/ as it is run by the XBMC user created by the package. However you did make me think of looking at the .install file for where is puts the home directory for the user and the config files are in there ('/var/lib/xbmc/.xbmc/' if anyone else ever needs to find them).
Problem solved.
Thanks
Last edited by Aradreth (2013-10-19 12:33:35)

Similar Messages

  • Using JNDI to access config file located outsite j2ee app

    Hi I'm wanting to store a config file for my J2ee app, somewhere on a tomcat server possibly inside the
    conf/ directory so that I can update this config file without having to redeploy the j2ee app every time a change is made.
    I've been told I can use JNDI to access this file, but I can't seem to find any examples or documentation on how I can do this.
    I'm new to JNDI and would appreciate any help, or suggestions.
    Thanks,
    Tim
    EDIT:
    So far I can access the file with this code:
    Hashtable env = new Hashtable();
              env.put(Context.INITIAL_CONTEXT_FACTORY, "com.sun.jndi.fscontext.RefFSContextFactory");
              try {
                   Context ctx = new InitialContext(prop);
                   // look up context for name
                   //env.put(Context.PROVIDER_URL, "file:C:\\confluence\\confluence-2.5.1-std\\conf");
                   File f = (File)ctx.lookup("/confluence/confluence-2.5.1-std/conf/test.txt");My new problems are:
    1. The commented line env.put(Context.PROVIDER_URL, "file:C:\\confluence\\confluence-2.5.1-std\\conf"); it says in examples that this should set the dir to look in to the conf dir but if i change the lookup value to just test.txt it cannot find it.
    2. Can I somehow set the context to look into the conf directory of Tomcat without hard coding the path, as the path could change or be different on different machines??
    Edited by: Timothyja on Jan 15, 2008 7:00 PM

    Hi Kiran,
    Looking at the code you sent and the error, it looks like you should be casting the ds object to a javax.sql.DataSource object not a weblogic.jdbc.common.internal.RmiDataSource object.
    You may find some useful info at the following URL:
    http://edocs.bea.com/wls/docs81/jdbc/rmidriver.html#1026007

  • Can I adjust the kernel config-file? [SOLVED]

    so i kicked out linux-3 kernel and installed the "aufs_friendly kernel" with the aufs2 package all went well...after the reboot i got an error "acer_wmid" failure .
    my question can i rebuild the kernel WHITOUT the "acer_wmi" part from the config-file within the kernel-source ????
    # Altera FPGA firmware download module
    CONFIG_ALTERA_STAPL=m
    CONFIG_X86_PLATFORM_DEVICES=y
    CONFIG_ACER_WMI=m <<==== compiled as module and i want to get rid off...
    CONFIG_ACERHDF=m
    CONFIG_ASUS_LAPTOP=m
    CONFIG_DELL_LAPTOP=m
    CONFIG_DELL_WMI=m
    CONFIG_DELL_WMI_AIO=m
    because in the heather of the file
    # Automatically generated make config: don't edit <<==== THIS ??!!
    # Linux/x86_64 2.6.39 Kernel Configuration
    # Mon Jun 6 22:07:19 2011
    anybody any ideas ??
    Last edited by gregor (2011-08-01 21:57:48)

    Uncomment the "make menuconfig" line in the PKGBUILD or run that command when creating your kernel config.  This will bring up the console config utility.  Navigate to Device Drivers --> all the way down to X86 Platform Specific..  Toggle Acer WMI Laptop Extras using the spacebar.
    gonna try ...i'd blacklisted the module for now.
    You can also edit the config file directly and change the 'm' to a 'n'  This will work but the reason it's not recommended is because some options are dependent on other kernel options.
    tried that one .....no success
    [EDIT:] Uncomment the "make menuconfig" line in the PKGBUILD = worked for me
    BIG THNX
    Last edited by gregor (2011-08-01 21:44:06)

  • ACE Startup-config file location

    Hello,
    I was reading the ACE docs and it sounds like the startup-config file should be listed under disk0: but I don't see it there. Can someone point out where the startup-config file is.
    Thanks
    Mike

    Hi MICHAEL,
    Upon startup, the ACE loads the startup-configuration file stored in Flash memory (nonvolatile memory) to the running-configuration file stored in RAM (volatile memory). When you partition your ACE into multiple contexts, each context contains its own startup-configuration file.
    Flash memory stores the startup-configuration files for each existing context. When you create a new context, the ACE creates a new context directory in Flash memory to store the context-specific startup-configuration files. When you copy a configuration file from the ACE, you create a copy of the configuration information of the context from where you executed the command.
    To display the directory contents of a specified file system, use the dir command in Exec mode. This command displays a detailed list of directories and files contained within the specified file system on the ACE, including names, sizes, and time created. You may optionally specify the name of a directory to list.
    The syntax for this command is:
    dir {core: | disk0:[directory/][filename] | image:[filename] | probe:[filename] | volatile:[filename]}
    The keywords and arguments are:
    •core:-Displays the contents of the core: file system.
    •disk0:-Displays the contents of the disk0: file system.
    •image:-Displays the contents of the image: file system.
    •probe:-Displays the contents of the probe: file system. This directory contains the Cisco-supplied scripts. For more information about these scripts, see the Cisco 4700 Series Application Control Engine Appliance Server Load-Balancing Configuration Guide.
    •volatile:-Displays the contents of the volatile: file system.
    •directory/-(Optional) Contents of the specified directory.
    •filename-(Optional) Information that relates to the specified file, such as the file size and the date it was created. You can use wildcards in the filename. A wildcard character (*) matches all patterns. Strings after a wildcard are ignored.
    For example, to list the files in the disk0: file system, enter:
    host1/Admin# dir disk0:
    host/Admin# dir disk0:
    7465 Jan 03 00:13:22 2007 C2_dsb
    2218 Mar 07 18:38:03 2007 ECHO_PROBE_SCRIPT4
    1024 Feb 16 12:47:24 2007 core_copies_dsb/
    1024 Jan 01 00:02:07 2007 cv/
    1024 Mar 13 13:53:08 2007 dsb_dir/
    12 Jan 30 17:54:26 2007 messages
    7843 Mar 09 22:19:56 2007 running-config
    4320 Jan 05 14:37:52 2007 startup-config
    1024 Jan 01 00:02:28 2007 www/
    Usage for disk0: filesystem
    4254720 bytes total used
    6909952 bytes free
    For example, to list the core dump files in Flash memory, enter:
    host1/Admin# dir core:
    253151 Mar 14 21:23:33 2007 0x401_vsh_log.8249.tar.gz
    262711 Mar 15 21:22:18 2007 0x401_vsh_log.15592.tar.gz
    250037 Mar 15 18:35:27 2007 0x401_vsh_log.16296.tar.gz
    Usage for core: filesystem
    1847296 bytes total used
    64142336 bytes free
    65989632 bytes available

  • Common Beans Faces Config (File Location)

    If you have a project with multiple JHeadstart App Definitions, what is the consequence of setting the 'Common Beans Faces Config' to a diffrent location for each App Def?
    e.g./WEB-INF/<subsystem>/JhsCommon-beans.xml
    Inside web.xml, javax.faces.CONFIG_FILES lists each of the separate JhsCommon-beans.xml files.
    I note that the help says this property should be set to the 'same across all application definition files'.
    JHeadstart 10.1.3

    Tom,
    1) On pressing find we notice the following (debug
    mode)
    -performs count hits query (e.g. 6 secs, a slow
    query!)
    -performs the main VO query with order by (again 6
    secs)
    -ripples through the label fetching (from bundles 3
    including jhs and javax)
    -once again, after the clear button label and before
    save button label (i.e. where table would be
    rendered), another count hits query (again 6 secs)
    total about 18 secs
    Any idea how to prevent the count hits (both)?Tom, I did the following: overwrite method getQueryHitCount in my ViewObjectImpl class, and set a breakpoint on the call to super. When I click find in a page, the method gets called through JhsSearchBean.executeAdvancedSearchBinding to determine whether any rows will be returned ro conditionally show the "Now Rows found"message, and whether the number of rows does not exceed the max number of query hits allowed.
    Then, if the query returns more rows than the rangeSize, the ADF Faces Table renderer calls the method again.
    So, I have either 1 or 2 calls to this method, not 3. The ADF Faces call canot be prevented, you could overwrite JhsSearchBean.executeAdvancedSearchBinding and remove the functionality that uses the getEstainmtaedRowCount call.
    To figure out why in your situation the method gets called 3 times, you can do the same as I did, overwrite getQueryHitCount and put a breakpoint on it.
    >
    2) For label fetching I note that the query labels
    are fetched twice (consequtively). Not sure what
    calls getMessage, but puzzled that it calls these
    labels twice, only once for the table column labels.This ADF Faces table rendering internals, nothing we can do about that.
    >
    3) One of the fields, FIND_STATUS is an
    af:selectOneChoice, with
    unselectedLabel="#{nls['UNSELECTED_LABEL']}", so this
    is translated.
    In addition the table has a field TABLE_STATUS, with
    same configuration.
    This second field as just displayed (not updateable),
    but if blank then the 'UNSELECTED_LABEL' translation
    is attempted for each row.
    Can JHeadstart control this to avoid this translate?
    i.e. the amount of translation is now row count and
    data dependent.Same as 20, This ADF Faces table rendering internals, nothing we can do about that.
    Steven Davelaar,
    JHeadstart Team.

  • SQL Agent job step - SSIS package - adding a config file - will it override the one that the package specifies?

    If I setup a job step to run a package and set the config file location on the "Configurations" tab, will that override the config file that the SSIS package is configured to use?  Or is this a "cumulative" type configuration option?
    I typically have my config file mixed in with my project files, but that path wont exist on the server.

    Hi Shiftbit,
    ETL vs ELT is right.
    In SSIS 2005, the DTExec utility loads and runs the package, events occur in the following order:
    The package file is loaded.
    The configurations specified in the package at design time are applied in the order specified in the package (except for Parent Package Variables).
    Any options specified from the command line are applied. Any configurations specified on the command line overwrite the current values; however, they do not trigger a reload of the configurations if a changed value impacts a configuration dependency. For
    example, if the connection string used for SQL Server configurations is updated from the command line at run time, the package will still retain any other values from the design-time SQL Server configuration database.
    Parent Package Variable Configurations are applied.
    The package is run.
    In SSIS 2008 and higher, utility loads and runs the package, events occur in the following order:
    The dtexec utility loads the package.
    The utility applies the configurations that were specified in the package at design time and in the order that is specified in the package. (The one exception to this is the Parent Package Variables configurations. The utility applies these configurations
    only once and later in the process.)
    The utility then applies any options that you specified on the command line.
    The utility then reloads the configurations that were specified in the package at design time and in the order specified in the package. (Again, the exception to this rule is the Parent Package Variables configurations). The utility uses any command-line
    options that were specified to reload the configurations. Therefore, different values might be reloaded from a different location.
    The utility applies the Parent Package Variable configurations.
    The utility runs the package.
    So, we can see that no matter we use SSIS 2005 which applies the Configurations once or use SSIS 2008 (or higher) which applies the configurations twice, the configurations specified in the command line will affect and not be overwritten by the configurations
    specified at design-time.
    Reference:
    http://technet.microsoft.com/en-us/library/ms141682(v=sql.110).aspx.
    Regards,
    Mike Yin
    TechNet Community Support

  • [SOLVED] Pacman "config file could not be read" error during Arch ins

    I've been attempting to get Arch setup for a while now, and after having some trouble with partitions, my wireless connecting, and setting up repos and mirrors, which the Wiki helped me solve, I've hit a bigger bump.  While updating the system using pacman as the Beginners Guide says to do, I get errors when I try to continue the update process as follows :
    btw: I'm typing this on a laptop next to my computer
    [root@McArch~]# pacman -Syu
    error: config file /etc/pacman.d/core could not be read
    error: config file /etc/pacman.d/extra could not be read
    error: config file /etc/pacman.d/community could not be read
    :: Synchronizing package databases . . .
    error: failed to updated core (unexpected error)
    error: failed to updated extra (unexpected error)
    error: failed to updated community (unexpected error)
    error: failed to synchronize any databases
    Any tips as to whats going on?  I've tried to created said files, and even insert mirrors into the file, like in the /etc/pacman.d/mirrorlist file but this doesn't seem to help
    Last edited by Windfinder (2008-09-29 20:43:29)

    Glad you got it working.
    I'm not sure what happened in your install but I just finished using an old 2007.08 iso and pacman first starts out with /etc/pacman.d/core, etc/pacman.d/extra, /etc/pacman.d/community ... etc., but I never had your problem when I did the #pacman -Syu after initial install reboot.  The pacman update removes the above mentioned repos and replaces them with a single /etc/pacman.d/mirrorlist.  You must have messed up an initial config file somehow as I couldn't get the same errors you got.  It looks like you had your /etc/pacman.conf file messed up somehow and when you pointed it to the mirrorlist it could finally work properly.  I'll just include my /etc/pacman.conf file and /etc/pacman.d/mirrorlist so you can compare.  NB*  these are from my x86_64 so for 32 bit machines i686 would replace x86_64 in the files.
    # /etc/pacman.conf
    # See the pacman.conf(5) manpage for option and repository directives
    # GENERAL OPTIONS
    [options]
    # The following paths are commented out with their default values listed.
    # If you wish to use different paths, uncomment and update the paths.
    #RootDir = /
    #DBPath = /var/lib/pacman/
    #CacheDir = /var/cache/pacman/pkg/
    #LogFile = /var/log/pacman.log
    HoldPkg = pacman glibc
    # If upgrades are available for these packages they will be asked for first
    SyncFirst = pacman
    #XferCommand = /usr/bin/wget --passive-ftp -c -O %o %u
    #XferCommand = /usr/bin/curl %u > %o
    # Pacman won't upgrade packages listed in IgnorePkg and members of IgnoreGroup
    #IgnorePkg =
    #IgnoreGroup =
    #NoUpgrade =
    #NoExtract =
    # Misc options (all disabled by default)
    #NoPassiveFtp
    #UseSyslog
    #ShowSize
    #UseDelta
    #TotalDownload
    # REPOSITORIES
    # - can be defined here or included from another file
    # - pacman will search repositories in the order defined here
    # - local/custom mirrors can be added here or in separate files
    # - repositories listed first will take precedence when packages
    # have identical names, regardless of version number
    # - URLs will have $repo replaced by the name of the current repo
    # Repository entries are of the format:
    # [repo-name]
    # Server = ServerName
    # Include = IncludePath
    # The header [repo-name] is crucial - it must be present and
    # uncommented to enable the repo.
    # Testing is disabled by default. To enable, uncomment the following
    # two lines. You can add preferred servers immediately after the header,
    # and they will be used before the default mirrors.
    #[testing]
    #Include = /etc/pacman.d/mirrorlist
    [core]
    # Add your preferred servers here, they will be used first
    Include = /etc/pacman.d/mirrorlist
    [extra]
    # Add your preferred servers here, they will be used first
    Include = /etc/pacman.d/mirrorlist
    [community]
    # Add your preferred servers here, they will be used first
    Include = /etc/pacman.d/mirrorlist
    # An example of a custom package repository. See the pacman manpage for
    # tips on creating your own repositories.
    #[custom]
    #Server = file:///home/custompkgs
    /etc/pacman.d/mirrorlist
    # Arch Linux repository mirrorlist
    # North America
    # - United States
    Server = http://mirror.neotuli.net/arch/$repo/os/x86_64
    Server = http://holmes.umflint.edu/archlinux/$repo/os/x86_64
    Server = http://archlinux.unixheads.org/$repo/os/x86_64
    Server = ftp://ftp.archlinux.org/$repo/os/x86_64
    Server = ftp://locke.suu.edu/linux/dist/archlinux/$repo/os/x86_64
    Server = ftp://ftp.gtlib.gatech.edu/pub/linux/distributions/archlinux/$repo/os/x86_64
    Server = ftp://mirror.cs.vt.edu/pub/ArchLinux/$repo/os/x86_64
    Server = http://mirrors.easynews.com/linux/archlinux/$repo/os/x86_64
    Server = ftp://ftp.ibiblio.org/pub/linux/distributions/archlinux/$repo/os/x86_64
    Server = http://mirror.rit.edu/archlinux/$repo/os/x86_64
    Server = http://mirror.umoss.org/archlinux/$repo/os/x86_64
    # - Canada
    Server = ftp://mirror.csclub.uwaterloo.ca/archlinux/$repo/os/@carch
    Well it was an interesting way to kill 30+ minutes.

  • I want to change the file location for the automatic backup file bookmarks.file, but I can't find browser.bookmarks.file in the list on the about:config page.

    I asked about automatic backup of bookmarks and received the following answer:You can make Firefox 3 create an automatic HTML backup (bookmarks.html) when you exit Firefox if you set the pref [http://kb.mozillazine.org/browser.bookmarks.autoExportHTML browser.bookmarks.autoExportHTML] to true on the about:config page. That backup is created by default in the profile folder as bookmarks.html, but you can set the file name and path via the pref [http://kb.mozillazine.org/browser.bookmarks.file browser.bookmarks.file] on the about:config page. I went to about:config page and toggled browser.bookmarks.autoExportHTML to “Yes” and it’s working. However, I want to change the file location, but I can’t find browser.bookmarks.file in the list.

    The browser.bookmarks.file preference does not exist by default. Right-click in about:config and select "New > String" to create it.

  • Delete multiple files from multiple locations using config file

    Hello All,
    I am fairly new to .net and I have to make a windows application to delete files older than 90 days from multi ple locations. these multiple locations cant be hard coded and have to be configurable, also the number of days to delete the files have to be
    configurable.
    I think the answer to this would be an app.config file. but dont know how to use the same.
    can anyone tell me about this and if possible help me out with a code snippet.?

    Add settings like picture below.  Add the string by press the double dot icon.
    The use the code below
    static void Main(string[] args)
    int deleteDays = Properties.Settings.Default.DeleteDays;
    StringCollection folders = Properties.Settings.Default.Folders;
    foreach (string folder in folders)
    DirectoryInfo info = new DirectoryInfo(folder);
    FileSystemInfo[] deleleteFiles = info.EnumerateFiles()
    .Where(x => x.LastWriteTime < DateTime.Today.AddDays(deleteDays))
    .ToArray() ;
    foreach(FileSystemInfo file in deleleteFiles)
    File.Delete(file.FullName);
    jdweng

  • SSIS - Change Config File Path LOCATION in SQL Agent Job Step (NOT USING DTEXEC)

    SSISers;
    I am not new to ssis but am trying to deal with promoting of ssis config files differently for a specific project. We are using SQL 2008 R2.
    As a standared pattern used for years, we just use SQL Agent, build a job step for the ssis package, add the ssis package as SQL Integration Services Package type from fileshare (not using Integration Services), and add the necessary production
    config files in the configutation tab of the job step. Easy.  We do not execute our packages with DTEXEC command line.
    A new project has the developers leaving the config files in the package - not removing the config files for deployment. Is there a way to override JUST THE CONFIG FILE PATH LOCATION in the job step for ssis package? Remember, we are NOT using dtexec. 
    I was told that /SET might do it but I do not see a good example anywhere of hooking this in and how it works for a CONFIG FILE PATH LOCATION - I see variable overrides but not CONFIG FILE PATH LOCATION. The packages were written with Absolute config file
    path and not Relative path.
    Please understand that my goal is to let them leave the packages as is, we move the config files to the production sever and all we have to do is flip the location of where the config files are sitting for the ssis pacakge to look for them.  We would
    rather NOT have to use DTEXEC command  line with the job step for reasons that I do no need to get into on this forum.
    Any suggestions are appreciated.

    Hi mg30,
    There is no way to overwrite the XML configurations file just through modifying the SQL Server Agent job steps.  The Dtexec utility will apply the default package configurations for the second time after applying the options specified in the command
    lines or other package configurations configured in the job step.
    If the package is not deployed/installed, the Dtexec utility looks for the XML configurations file according to the file path defined in the Package Configurations Organizer window. In this situation, you need to either disable the package configurations
    or modify the XML file path in the BIDS.
    If the package is already deployed/installed, you need to modify the package as above or re-specify the install folder for the package configurations file. 
    Regards,
    Mike Yin
    If you have any feedback on our support, please click
    here
    Mike Yin
    TechNet Community Support

  • [SOLVED]Shutdown fails, probably because of some config file I changed

    Right, i can't shutdown or reboot properly (pm-util's suspend works).
    When I try, all (or most, I can't tell) of the deamons are closed properly, but then something attempts to do something with slimlock. It loops so fast I cant' really read the error
    message, but I don't think slimlock is even suposed to be accessed at that point.
    Deleting slimlock doesn't help, it just gives a "couldn't find command slimlock" (or something similar) error instead.
    I have some vague idea that I'm to blame this, because I seem to remember messing around with the shutdown process, trying to get it to call slimlock before anything else.
    The thing is; I don't remember.
    From now on I'll keep some file with a log of changes I make to scripts and config files, to make this easier, but this time I really need help finding out what the heck I've done : )
    Last edited by Bladtman242 (2012-03-10 01:48:46)

    I've commented the bash scripts out, and the problem persists.
    So I figured I could "limit" the search to
    find / -mtime -14 -and -size -2M -exec grep -lisE ".*slimlock.* {} \;"
    It turned out to be a "sleep" script in /bin.
    I still have no idea why that was called, but I'm marking the thread as solved
    Thanks for your efforts
    Last edited by Bladtman242 (2012-03-10 01:42:56)

  • How to change location for config files in WLS6.0 (like weblogic.home and weblogic.system.home in 5.1)

    Hi,
    I would like to point weblogic to a directory NOT under c:\bea\... for it's configuration.
    I used to do this on WLS 5.1 by setting:
    weblogic.home=/weblogic and weblogic.system.home=/projects/wlsconfig
    This way my config was NOT coupled to the weblogic install.
    I want to do the same thing, and have the config directory located in /projects/domainconfig
    for example.
    weblogic.system.home etc doesn't seem to do anything. The
    only variable that does anything is bea.home, but I need weblogic to find it's
    libs etc in /bea, but ONLY the config should be elsewhere.
    Any help would be great.
    Thanks,
    Dion

    From SP1 and beyond, you can use
    -Dweblogic.RootDirectory=<dirname>
    * The property for specifying configuration location:
    * The directory name of the domain from which to load the specified
    * configuration. The default is ".".
    * -Dweblogic.RootDirectory=<dirname>
    * The directory must exist.
    Dion Almaer wrote:
    Hi,
    I would like to point weblogic to a directory NOT under c:\bea\... for it's configuration.
    I used to do this on WLS 5.1 by setting:
    weblogic.home=/weblogic and weblogic.system.home=/projects/wlsconfig
    This way my config was NOT coupled to the weblogic install.
    I want to do the same thing, and have the config directory located in /projects/domainconfig
    for example.
    weblogic.system.home etc doesn't seem to do anything. The
    only variable that does anything is bea.home, but I need weblogic to find it's
    libs etc in /bea, but ONLY the config should be elsewhere.
    Any help would be great.
    Thanks,
    Dion[att1.html]

  • [SOLVED] Parsing simple config files in pure bash

    Hi everyone,
    I'd like to implement a bash function to parse a simple config file for a script I've wrote. The conifg file contains different sections for different scenarios. Here's an example how it should look like:
    # configuration file
    # global settings
    global {
    DATE_PREFIX="-I"
    SSHFS_OPTS="-C"
    EXT_FULL="full"
    EXT_DIFF="diff"
    EXT_CATALOGUE="catalogue"
    DAR_OPTS="-v -m 256 -y -s 600M -D"
    DAR_NOCOMPR="-Z '*.gz' -Z '*.bz2' -Z '*.zip' -Z '*.png'"
    # system settings
    system {
    DAR_OPTS="-v -m 256 -y -s 200M -D"
    It contains some settings which are global for the whole script and special settings groups which can be used to overwrite global settings.
    The function to parse this config file looks as follows:
    #!/bin/sh
    CONFIG="/home/chi/.daruprc"
    function readconf() {
    match=0
    while read line; do
    # skip comments
    [[ ${line:0:1} == "#" ]] && continue
    # still no match? lets check again
    if [ $match == 0 ]; then
    # do we have an open tag ?
    if [[ ${line:$((${#line}-1))} == "{" ]]; then
    # strip "{"
    group=${line:0:$((${#line}-1))}
    # do we have a match ?
    if [[ ${group} -eq $1 ]]; then
    match=1
    continue
    fi
    continue
    fi
    # found close tag but still no match - continue
    elif [[ ${line:0} == "}" && $match == 0 ]]; then
    continue
    # found close tag after config was read - exit loop
    elif [[ ${line:0} == "}" && $match == 1 ]]; then
    break
    # got a config line return it
    else
    echo $line
    fi
    done < "$CONFIG"
    for line in $(readconf "system"); do
    echo $line
    done
    As you can see I try to just echo the lines at the moment. And here's the problem: It seems I have some " escape issues, if I run it I get the following output:
    ./parseconfig.sh
    DATE_PREFIX="-I"
    SSHFS_OPTS="-C"
    EXT_FULL="full"
    EXT_DIFF="diff"
    EXT_CATALOGUE="catalogue"
    DAR_OPTS="-v
    -m
    256
    -y
    -s
    600M
    -D"
    DAR_NOCOMPR="-Z
    '*.gz'
    -Z
    '*.bz2'
    -Z
    '*.zip'
    -Z
    '*.png'"
    As you can see there are way to much newlines - which leads to problems when I try to use "eval" to initialize the variables.
    I am sure I am missing something simple here, however I am looking for a solution for a few days now - maybe one of the bash gurus on this board can enlighten me ;-).
    Thanks in advance
    PS.: I am trying to do this in pure bash because the script also needs to run on embedded machines with very low memory like my router on which I don't have sed or awk or the like. I also know that I could for example just use different config files to circumvent the whole parsing - but I am just curious if this could work the way I like ;-).
    Last edited by chimeric (2007-11-04 23:20:58)

    chimeric wrote:
    Hi MrWeatherbee,
    well yes, but I want to assign (eval) these lines to get variables out of them. Since the while loop is trapped in its' own subshell I need to return the lines into the parent one to be able to make these variables "visible" in the script itself.
    Right. But I was trying to show you that the way you were going about it wouldn't work at a very fundamental level.
    Without changing too much code just for a quick and dirty demo,
    change:
    # got a config line return it
    else
    echo $line
    fi
    done < "$CONFIG"
    # got a config line return it
    else
    line_array=( "${line_array[@]}" "$line" )
    fi
    done < "$CONFIG"
    numarrayelements=${#line_array[@]}
    and then in the main program code, do this:
    readconf "system"
    for index in $( seq $numarrayelements ); do
    line=${line_array[(($index-1))]}
    echo $line
    done
    Using an array to collect the good lines from the function allows you to reuse them later for whatever purpose. Although other ways exist, you certainly don't want to do what you originally did.
    Edit:
    I posted the code with an incorrectly referenced variable and had to fix it.
    Last edited by MrWeatherbee (2007-11-04 22:46:34)

  • Location of MTA and POA config files:

    Hello. I'm reading an article from cool tools by Kiril Stankov regarding
    moving a groupwise database to a new volume or server. In step 4 he says
    if you are moving data between servers make sure to copy the POA, MTA,
    WAA and GWIA config files. The only one I can find is the gwia.cfg. I
    looked under SYS:\system for the others and can't find them anywhere.
    Thanks

    > What's in grpwise.ncf ?
    >
    > It should be something like
    >
    > LOAD SYS:\SYSTEM\GWPOA @POA.POA
    > LOAD SYS:\SYSTEM\GWMTA @MTA.MTA
    LOAD SYS:\SYSTEM\GWPOA @CTCPO.POA
    LOAD SYS:\SYSTEM\GWMTA @CTCMAIL.MTA
    > the files you want are the ones after the @ sign, and they should be in
    > the directory referred to in the load bit, in this case sys:\system
    Ok. So I can, in my case anyway, just copy my SYS directory over if I
    choose too
    > Cheers Dave
    >
    >
    > --
    > Dave Parkes [NSCS]
    > Occasionally resident at http://support-forums.novell.com/

  • [SOLVED] Resetting config files from a package

    Suppose I modify a file called /etc/examplefile.conf from a package example-package.
    What is the easiest / most elegant way to reset this file? Reset = restore the file to its original, removing my modifications.
    This[1] topic discusses this, but it is two years old. I would say the "best" solution there was the one suggested in #7:
    you could move the config file first then reinstall.
    But I'm not sure if this is safe. For a dummy example, removing /etc/pacman.conf then reinstalling pacman wouldn't probably be a good idea (I suspect this wouldn't work).
    OBS.: Getting the original file from the package from the cache is an obvious solution, but I'm searching for a simpler (more direct) way to do this (a bash/zsh one-liner would be sufficient, for example).
    [1]: https://bbs.archlinux.org/viewtopic.php?id=137526
    Last edited by thiagowfx (2014-04-26 21:49:20)

    FYI, pkg_scripts are available both in the AUR https://aur.archlinux.org/packages/pkg_scripts/ and in Xyne's repo: https://wiki.archlinux.org/index.php/Un … #xyne-i686 or https://wiki.archlinux.org/index.php/Un … #xyne-i686

Maybe you are looking for

  • How can i move pictures from my ipad to a SD card?

    I have the adapter for the sd card and i can load on to the ipad. But i would like to load from the ipad to the SD card with out having to load the photos on to my computer. Is this possible?

  • Splitting One Large clip in Event Library

    I recently had some 8mm film transferred to digital. I found some Christmas' that were taken when I was a kid. This segment was on 11 minute stream of multiple Christmas' together. When I imported the AVI that I received back, it naturally was on lon

  • Creative Vision:M 60 GB prob

    I got my Vision:M back in January and it's been working great... until a few days ago. For the past week, it's been taking longer to load (though I only have 30 GB filled) and it's been freezing a lot (that's only happened once or twice before). Now

  • Hyperlink to a local file.

    Hi ABAP Masters, I am developing a screen program that gets a file from a local PC (example desktop) and then there is an output field that displays the hyperlink of that file. Is it possible to create a hyperlink to that local file such that when th

  • Iphoto slide shows on Apple TV ignores Music settings

    I use iphoto slide shows on my apple tv as you have more control over the burns effects etc. rather than Apple tv taking control. I have a problem where after setting the slide show timing to fit the music track (fit slide show to music in iphoto) wh