Suggestion for init scripts

I like the simplified sysvinit scripts that Arch uses, but I think the file locations could be improved a bit.  /etc should be reserved for configuration files only; when you put init scripts in there as well the /etc folder gets a little cluttered.
Since we already have an rc.d folder anyway that contains some of the init stuff, why not put all rc scripts, settings, and so forth in the same rc.d folder?
I'm probably not the smartest person to be talking about optimal naming conventions and file locations for the sysvinit stuff... I renamed my rc.conf to CONFIG.SYS and my rc.sysinit to AUTOEXEC.BAT

tomk wrote:Could you clarify your suggestion? All the application init scripts are already in /etc/rc.d, and the system init scripts e.g. /etc/rc.sysinit, are in standard locations. The rest of /etc consists of system-wide application configs, and their locations are determined upstream.
Also, iBertus is right.
Well, I wasn't talking about the rest of /etc - specifically the init scripts (rc.single, rc.multi, etc.)  Alas, I'm unfamiliar with the bsd init process (or at least I was before this discussion).  Since one of the packages we install from base is sysvinit, I *assumed* (there I go again) it was indeed a SysV init process, only modified for Arch purposes.  That is, I thought y'all just arbitrarily decided to put rc.multi et al in /etc. and I was suggesting, as long as you're arbitrarily changing stuff around, why not keep all the rc. stuff together in /etc/rc.d.  Now that I know you're just conforming to bsd standards, my premise (that it was an arbitrary decision) is meaningless so I withdraw the suggestion and stand corrected.
shining wrote:Seeing how much the rest of your post makes sense, I am not even sure if that's supposed to be a joke.
Wow, I should have stayed back in newbie corner where there's no such thing as a stupid question!  It is a joke... and I was serious.  That is, I really did rename rc.conf to config.sys and rc.sysinit to autoexec.bat, but specifically *because* it's a joke, even if I'm the only one who will ever see it.  Kinda like the APPLE ][ logo I use for my Fluxbox wallpaper.
Thanks for the explanations, ibertus and tomk... I obviously have a lot to learn about Arch (and *nix in general) before I'm ready to pitch in with meaningful suggestions!

Similar Messages

  • Any Suggestions for CGI Script for Web Slide Slow?

    Do you have any suggestions for creating a slideshow for my web site, 6 same-size jpgs that rotate automatically?
    I think I prefer a cgi script. However, I've tried two that don't work on Firefox or Safari. One developer tells me that he can see the rotating photos.
    I'm also open to software to create this. However, I'd prefer to use html code.
    Of course, it must work cross platform.
    Any suggestions?
    G5 Quad; Mini Mac; PowerBook G3; iPods   Mac OS X (10.4.8)   Using Dreamweaver 8

    Oh, what a beautiful baby! Is he/she yours?
    She is mine. At least that's what the Mrs. tells me!
    When you say gif, I am assuming that you mean the
    format really must be gif and not jpg. Is that
    correct?
    Yes, the file is a GIF file. It's actually an animated GIF file, meaning that the images that you see are all frames of animation in a single GIF file. There are a lot of apps out there that can create animated GIFs. I happen to use Adobe ImageReady because that is what is on the hard drive.
    Can you give me a hint about the dithering issue? Do
    I dither or not dither, that is the question.
    This is the major downside of the GIF format. It is a really old format...from back in the CompuServe bulletin board days...maybe older. Anyways, it is my understanding that GIFs can only hold information for 256 colors....any 256 colors, but no more and no less. So now in the days of "millions of colors" jpegs, you can imagine that a 256 color palette is limiting. But if the colors of your images are sufficiently close, its possible that 256 colors makes for perfectly acceptable images across all images. This is the one variable of converting images to GIF that can make it or break it for you. If your image has a pretty broad tonal range...like fleshtones or any other gradient...then 256 colors is going to represent things poorly. Then you will get dithering artifacts which is like averaging errors...colors are close...as close as possible...but not close enough to make a smooth gradation. Anyways, that's my layperson's understanding.
    But for some images, it looks just fine.

  • Suggestion for Inital Flowcharts in Adobe Illustrator

    Ive been doing some very intricate DVD projects (intricate for me, at least) and have found that I was spending far too much time with pencil & paper doing my flowcharts, before I began the Project. I was also using up erasers faster than I could replace them from Staples. Since I had Adobe Illustrator on my workstation and my laptop, I went to it for assistance.
    My general workflow follows:
    Open an new AI document (8.5"x14" landscape works fine, and I have used 11"x17" for my wide-carriage printer too, when we had dozens of Menus and Assets) and begin just like the Flowchart in Encore with the Disc with a circle. Create a 4:3 rectangle w/ stroke set to ~3px. (can also be 16:9, if that is the format of ones Project), and then dupe these, as needed. If I have my Menus already, Ill Import the flattened PSD from PS and Place into the appropriate rectangles. Below each of these, I list the Buttons (using Myleniums suggestion elsewhere, to re-name the Buttons). If I have the Menus already, I can show the link from the actual Button on those Menus). I usually place the Disc circle and the rectangles on a separate Layer, and then add my link-lines on a Layer below. Each Chapter, or Timeline gets its own Layer for easy manipulation, and Ive gone so far as to Capture (usually in PP2 a representative Poster Frame [Export Still Frame] to be used in the Chapter, etc. rectangles for the Button links. Ive been printing out these AI flowcharts for client approval and even added a sign off graphic that they are required to sign and date, before additional work commences. They also get a finalized AI printout, so they can follow all navigation. I then add arrowheads to the link lines, usually on the same Layer as the link lines.
    The beauty of this is that much of the layout can be used for other Projects. If I do not have the Menus created yet, Ill just do a text name for each Menu, adding to that the image, when I get that far. With AI, I have saved a bunch of $ on erasers, my clients have a perfect vehicle to see the navigation, and I get a signed/dated copy for the files, in case there are any questions later. These also can be Exported to PDF for e-mailing. Ive Save(ed)_As several versions of the base AI file, for future use. After the initial Document setup, its very easy to adapt the layout for each Project.
    Programs used:
    Adobe Encore
    Adobe Illustrator
    Adobe Photoshop
    Adobe Premiere Pro
    Hunt

    I could not agree more.
    Not only that, but I would also
    i strongly
    recommend that all authors follow this advice. One of (to my mind, anyway) the main ingredients for a successful authoring experience - and not just with Encore, but with all applications - is proper planning. Once you have a map of your layout, it's easy to keep track of not only where everything
    i needs
    to go, but also whether or not you have made that link yet as well.
    The same thing applies to asset management too.
    If you follow these rules below, things will be a lot easier for you - and therefore more profitable as well.
    1 - Don't import a single asset until your client has signed off on them.
    2 - Try, wherever possible, to encode your assets
    i outside
    of Encore - this will allow you to send the encoded files to your client for sign-off as they will know exactly what the final quality will be.
    3 - Make your client sign off on the flowchart too. This will prevent "Feature Creep", as when they (inevitably) call up & say "Can you just add....." you can turn around & say "Yes, but it will cost extra, as we will now have to rework the flowchart, and quite possibly re-encode all the assets again to make it all fit"

  • [SOLVED] netatalk and postfix init scripts (not systemd)

    Hey, does anybody have an older version of Arch running somewhere?
    I'm looking for init scripts for netatalk and postfix that I've just re-built from ABS on an outdated Arch system. However, both packages offer systemd support these days and no love for dissidents like myself.
    They are probably very simple to write on one's own, but I just want to make sure I don't overlook some important trick.
    If someone could possibly post those either here or on dpaste.org or whatever paste service you love, I would be a very happy person lol
    Last edited by iliv (2013-12-01 14:17:00)

    netatalk is in the AUR https://aur.archlinux.org/packages/netatalk/
    postfix: https://projects.archlinux.org/svntogit … a3365f273e

  • I blog on TypePad using Word 2007 and documents freeze when I'm looking at them in Windows explorer; why do I get the error message that Mozilla is looking for a script?

    I have now had two error messages - the first one looked for this script: Script: resource://gre/modules/XPCOMUtils.jsm:258. The second one (today) looked for Script: resource://gre/components/nsPrompter.js:68.
    I have reset my word template, also reset word registry for data and options (as per Microsoft's help pages) for both those 'fixes' there was an initial improvement, but the problem happened again after I reposted on my blog today and then went to Windows explorer to view my files. It seems to 'seize' as I select a file, so that the preview does not appear (for up to 15-20mins).
    I see on the internet using the second script as a search just now that one other has had a similar problem and one also since Mozilla 4 upgrade. My problems have also been pretty much since I upgraded.
    It happens (apart from my fixes) every time I go to look at a word document via Windows explorer. Excel files are less affected.
    One web suggestion is to clear the cache, but I am hesitant to lose all my passwords unless I have to.

    I still have the problem although I uninstalled Mozilla (clearing the cache didn't work and neither did Word diagnostics), so have ended up thinking it could be Norton (the manual update worked x1) or Windows. Today I found an answer: disable the preview pane in Windows Explorer - there's a history of problems with this view.

  • How to schedule a crontab job for a script?

    Hi,
    Can anyone help me in this?
    Actually, i want to schedule a crontab job for a script.
    the script needs to check for a file in a diectory.
    When ever a particular file in a directory is created, then i need to run that script. (creation time of file and execution time of script must be same)
    So, how can i do this?
    any suggestions?
    Thanks,
    Suman.

    crontab manual http://linux.about.com/od/commands/l/blcmdl5_crontab.htm
    if you need check files on OS, crontab is good way... to do
    Example: checking trace file older 30 days and remove (00.00 -> every days )
    file.sh:
    ........begin file......
    #!/bin/sh
    find PATH/udump -name '*.trc' -type f -mtime +30 -exec rm {} \;
    ........end file......
    $ chmod 750 file.sh
    $ mv file.sh /home/oracle/file.sh
    -- edit crontab
    $ crontab -e
    0 0 * * * /home/oracle/file.sh
    -- list crontab
    $ crontab -l
    0 0 * * * /home/oracle/file.sh
    good luck

  • Some init script ideas

    I'm packaging GNUstep... again (this time from CVS), and it requires a certain shell script to be sourced by every shell.  That's easy enough for any user to do by modifying their .foorc and adding it in there, but I thought I would just throw a command in the postinstall to symlink the shell script to /etc/profile.d, so every login shell would automatically source it.
    That's all fine and dandy, but xterms by default aren't login shells, so anybody using an xterm would find themselves without a working GNUstep build environment unless they set xterm to be a login shell in their .Xdefaults.
    Change #1) Make xterms login shells by default in Arch's xfree86 distribution
    Now that xterms are all login shells, and we can expect a user's shell to be a login shell by default, why not add scripts to profile.d for the various self-contained distributions that live in /opt (like gnome, kde, java, etc.) that automatically set up the paths for those binaries.  At the moment, it appears you have to do this manually (I have not installed gnome or kde though, maybe those maintainers are doing this).
    Change #2) Have packages that live in /opt add a script to profile.d setting up the paths and environment necessary to use those packages.
    Thirdly, there's two daemons that need to be started for GNUstep when xfree86 starts (specifically gdnc and gpbs).  Once again, this is something that can easily be done by a user editing their .Xsession, but I'd rather automate it.  In the spirit of Arch's init script system, I think it would be wise to make an xinit.d directory (possibly in /etc, or more to the keeping of X's directory structure, in /etc/xinit.d), full of files that are run whenever X is started.  These could be enabled and disabled in rc.conf just like init scripts in rc.d currently are.
    Change #3) Add an xinit.d directory, in the spirit of rc.d and profile.d, full of items that are run whenever X is started.
    Perhaps some of this has already been done, or perhaps there are other solutions.  I just think these changes would be well in the spirit of Arch, and a boon to package maintainers.
    Please give me your feedback either here or by mailing me at [email protected]
    -- Michael Baehr

    sarah31 wrote:most if not all /opt package sets have profile.d scripts.  some may not think so but one has to log out then in to enable them.
    Good Looks like profile.d is being used for the right purpose.  I should've expected it would be  :oops:
    Xentac wrote:Ok... but what happens if I'm running blackbox?  I probably don't want gdnc and gpbs started when I start X, it'd make me cry.  How would xinit.d help with that?
    I don't see why it'd make you cry.  Let me explain what gdnc and gpbs are:
    GNUstep Distributed Notification Center
    Handles messaging and notification between GNUstep applications
    GNUstep Pasteboard Server
    Handles rich copy and paste between GNUstep applications
    Basically, none of these would impact whatever environment you'd be running, and only GNUstep apps would use them.  In fact, you wouldn't even realize they were running as they'd just be sitting in the background like the valiant daemons they are, waiting to be called into service for the holy emperor GNUstep  :twisted:
    And in any case, with the whole xinit.d idea, you should be able to just disable it with a ! if you don't like it
    I might as well throw in my last idea, which I forgot to write before.
    I've noticed people complaining about Pacman upgrades wiping their pacman.conf, which is a problem if you're using several people's TURs and other external repositories like I am.  Instead, I propose doing what APT has been doing in a recent version with its new sources.list.d layout... having one directory (pacman.repo.d or something of its ilk) storing files for each repository, and enabling and disabling them in pacman.conf the way you do in rc.conf (with a bang).  This would be especially nice because somebody could install a package called, for example, "pacman-TUR", and have a repo file for each TUR, and then be able to enable or disable them.  This package would be updated every time a new TUR was added or one was removed, thus enabling people to easily track the latest repository happenings, while still maintaining control over what repos they use.
    Just a thought.

  • Suggestion for future release

    Where should I post suggestions for future releases of SQL Developer or/and Data Modeler?
    Please give me a link.
    Thanx,
    Chris
    One suggestion for Data Modeler:
    In the "Model Properties" of a relational model, there should be a "scripts" folder like in the "Table Properties".
    In this script I'd like to generate some global statements for the DDL generation,
    for example:
    before (=begin of generated script): set define off; alter session set nls_numeric_characters='.,'; nls-config
    after (=end of generated script): commit; (when table inserts are used and no ddl-statement is following; otherwise you have to use 'commit' in each table-script; After the last table create (ddl-) statement there is no implicit 'commit')
    I know, that I can edit the generated script to add my statements, but if you often generate code there is a good change to forget to change the script afterwards.

    Hi,
    You can submit any feature requests at Oracle SQL Developer Exchange - https://apex.oracle.com/pls/apex/f?p=43135:1:2266866887402592:::::

  • Init scripts

    It has been a while since I last posted, but I like arch.
    My question is regarding the init scripts used in arch.  Specifically, three common commands used in the init scipts, and they are "stat_fail","stat_done", and "add_daemon".
    Could some refer me a wiki, webpage or man page for them, and yes I see there definitions in /etc/rc.d/functions file.

    For example in add_daemon:
    add_daemon() {
            [ -d /var/run/daemons ] || mkdir -p /var/run/daemons
            touch /var/run/daemons/$1
    What is the variable $1 refer to?  I cannot see it defined anywhere else in the function or in the /etc/rc.d/functions script.  Could it be the function referred to in which /etc/rc.d/"script" is run; "script" being whatever init service that is started and stopped,  ie crond would be then touch /var/run/daemons/crond?
      For what it is worth I am just trying to improve my shell scripting skills.
    [/i]

  • Dhcpcd starting by wich init-script? [Solved]

    I have static ip on both eth devices.  These configured by netcfg: with if1 and if2 files in /etc/network.d/
    here they are:
    cat /etc/network.d/if1
    CONNECTION='ethernet'
    DESCRIPTION='ethernet connection to internet'
    INTERFACE='eth0'
    IP='static'
    ADDR='10.85.231.106'
    NETMASK='255.255.0.0'
    GATEWAY='10.85.231.65'
    DNS=('10.85.224.33')
    cat /etc/network.d/if1
    CONNECTION='ethernet'
    DESCRIPTION='ethernet connection to localnet'
    INTERFACE='eth1'
    IP='static'
    ADDR='192.168.225.222'
    NETMASK='255.255.255.0'
    But my resolve.conf sometimes is overwritten by dhcpcd.
    in /etc/rc.conf I don't have any property connected with net set except HOSTNAME="ramazotty" and NETWORK_PERSIST="no"
    my daemons are:
    DAEMONS=(hwclock syslog-ng network net-profiles sshd samba xinetd @cupsd dbus @netfs crond)
    Who in the world is starting dhcpcd?
    p.s. The parent is process 1:
    >ps -f `pidof dhcpcd`
    UID        PID  PPID  C STIME TTY      STAT   TIME CMD
    root       497     1  0 15:09 ?        Ss     0:00 dhcpcd -q
    Last edited by roginovicci (2012-10-26 09:16:04)

    FYI you don't need the network init script when you're using netcfg.
    This is not the answer you're looking for, just some useful information - unless you happen to be wrong about your rc.conf.

  • Synergyc as init script

    Greetings,
    I am trying to start synergyc as an init script so that it will work with slim, i copied the init script from the wiki, however, i get the error Fri Apr 13 10:16:02 2012: /usr/bin/xset:  unable to open display ""
    and the client never connects to the server.
    thanks!
    Adam

    If you're using slim, just put it in your .xinitrc, it's much easier and tends not to throw as many errors (at least for me, anyway).

  • Interface suggestion for Collections and Presets windows

    Hi,
    I would like to suggest you an improving of the left part of the main screen. I wish - maybe one day - that you can modify the management of collections, presets, etc...
    When you have a lot of Presets and Collections, and we need to switch between them asap, it's very difficult to scroll all of the list (...the scrollbar is also on the left ! Strange idea...)
    The best idea will be to redraw the actual design : in that case, the title bar and their "contextual menu" still always visible.
    A simple mouse clic would allow to uncollapse Collection or Presets lists very quickly on the top. All titles won't be never hidden.
    Please, take a look at my screen capture (my suggestion) for a better explanation.
    Thanx.

    Hi thanks for help,
    The thing is, I need all the data if the user wants to see Details, then I will need to display all rows. On the other hand, Sybase doesnt have the stdev function, I wrote a query that calculates stdev, but I will need to run the query once for each person, because it looks like this:
    select
    (SQRT((sum((MyFieldName - (select convert(dec(10,2),avg(MyFieldName))
    From MyTableNameWhere
    MyWhereCriteria and
    abs(MyFieldName)>0))*(MyFieldName - (select convert(dec(10,2),avg(MyFieldName))
    From MyTableNameWhere MyWhereCriteria and abs(MyFieldName)>0)))) /(select count(MyFieldName)-1
    from MyTableNamewhere MyWhereCriteria))) 'StDev'
    from MyTableName WHERE MyWhereCriteria
    where MyWhereCriteria would be
    where date = '07/03/2009' and name = 'John'
    so some of the subqueries return multiple rows which is a problem..
    I got error saing:
    [Error] Script lines: 13-30 ------------------------
    Subquery returned more than 1 value. This is illegal when the subquery follows =, !=, <, <= , >, >=, or when the subquery is used as an expression.
    Msg: 512, Level: 16, State: 1

  • WOL, init scripts and KDE

    Hello
    So, I may be confused with how init scripts are working, but in this case there is something I do not get.
    I am trying to be an energy efficient geek, so I decided to set-up a Wake On Lan (WOL) on my home server. The WOL itself is working fine, no issue on this side, but in order to have this working after each reboot, and according to the wiki, I have to add the following code to my rc.local file to set the WOL flag to my network interface.
    ethtool -s eth0 wol g
    And here is the problem : by default, my "server" starts a kde session after the boot. So my inititab is like that :
    ## Only one of the following two lines can be uncommented!
    # Boot to console
    # id:3:initdefault:
    # Boot to X11
    id:5:initdefault:
    # Example lines for starting a login manager
    #x:5:respawn:/usr/bin/xdm -nodaemon
    #x:5:respawn:/usr/sbin/gdm -nodaemon
    x:5:respawn:/usr/bin/kdm -nodaemon
    #x:5:respawn:/usr/bin/slim >/dev/null 2>&1
    With these settings, the WOL flag is not set correctly after the boot. Now, if I do not start kde, use a console login and change my inittab to :
    ## Only one of the following two lines can be uncommented!
    # Boot to console
    id:3:initdefault:
    # Boot to X11
    #id:5:initdefault:
    # Example lines for starting a login manager
    x:5:respawn:/usr/bin/xdm -nodaemon
    #x:5:respawn:/usr/sbin/gdm -nodaemon
    #x:5:respawn:/usr/bin/kdm -nodaemon
    #x:5:respawn:/usr/bin/slim >/dev/null 2>&1
    In this case, the command in rc.local is executed correctly and my WOL flag is set as I want. So, either kde overwrites the flag when it starts or the rc.local file is not executed.
    Anyone with a clue of what is going on and how to solve that ?
    Thanks !
    Last edited by Cobaltounet (2011-02-02 04:25:24)

    zenlord wrote:
    Since your problem is solved, it might be the right time to ask my question to you regarding WOL:
    My server broadcasts it's IP across the network to be discoverable as a uPNP-server. I'm guessing that functionality will be lost if it is turned off, so I should configure all my uPNP-clients to send a magical packet whenever I decide to use them (which would be nearly impossible: I don't see this possibility for a PS3...)
    I am not an expert in uPNP, but I am afraid that there is not a lot of solutions to your problem. If your server is powered off, then something has to wake him up. You can probably do that from your laptop/desktop or your router directly but I do not think a PS3 can do it. And having to send the magic packet manually each time you want to use a uPNP device kind of defeat the convenience of the uPNP.

  • Compiling init scripts as C

    Hello!
    A while back, I read that Blice (owner of http://its.alrig.ht/) had converted their init scripts to C to help the computer boot faster.
    Unfortunately, Blice's site seems to have disappeared, which is a shame since I'd like to read some of the information on his webpage.
    Anywho, my question is: anybody here have experience in converting startup scripts to C?
    I've rewritten the apache, ssh, and postfix startup scripts so far. I've put the code up on GitHub at http://github.com/ColinJones/binary-startup
    Any thoughts?

    I kind of like the idea myself. I would like to help with the development.
    After rethinking a bit, I don't think the hardest part to develop is the actually code, the part that is going to be challenging is the build script. I mean, if it is going to be according to my original idea, the program code itself is going to be simple but to be able to have simple program code when parsing rc.conf it means that the build script has to be a bit more complex, otherwise it will mean that the program code itself has to parse rc.conf. Well, that means if the rc.conf is going to be parsed in the first place. I think it should be parsed during build time, it will be a bit like mkinitcpio but for the initscripts but that is of course in my opinion.
    One of the first thing that needs to be done is probably do a prof-of-concept of a program + build script that can depending on the content of the config file build a program with different functionality. This is pretty much to simulate the DAEMONS array. A traditional way of doing this with statically linking is to including different files with the same interfaces and in case a functionality is not going to be present, use interface functions that are empty. This pretty much works when there isn't a lot of different functionality but I think there are to many possible DAEMONS to make this practical. I think a better way is to generate a config.h (or use a different name for the file) which contains a list of functional pointers to all the "modules" that should be included. In short, make the program aware of the function and include the file that contains the function to the linker and make the complete process dynamically.
    I might look in this prof-of-concept during the weekend.
    Last edited by PJ (2010-01-08 18:18:09)

  • Openrc init scripts source?

    I have been using openrc as my init system, with apg's method. I have had no issues, however, I would like to know if there is some kind of repo for openrc scripts, as till now, I have been writing many initscripts in my own.
    EDIT: I have also been extracting artoo's packages and using those initscripts, but it is a very few scripts.
    Last edited by aditya3098 (2014-10-29 15:21:23)

    To my knowlage there is no such a repo/site. Our openrc implementation is unofficial and community driven which means it gets less support, plus we have two incompatible implementations. One of us could start a github (or something like that) repo and keep all our home made scripts/rules etc. Would like to see that happen, and soon I may have something to contribute with.

Maybe you are looking for