All pastes #409269 Raw Edit

Stuff

public text v1 · immutable
#409269 ·published 2007-03-25 15:34 UTC
rendered paste body
<?xml version="1.0" encoding="UTF-8" ?>
<einit>
<!-- you will need to modify this file -->
 <configuration>
  <daemon>
   <xuser s="sam" />
  </daemon>

  <system>
   <swap device="/dev/sda2" affinity="1" />
  </system>

  <network>
   <hostname s="truc" />
   <domainname s="labas" />

   <wireless>
    <ssid s="default" />
   </wireless>

<!-- example for a static network configuration, use with the commented module using the shell-net-eth1-static template from below -->
   <interfaces>
    <eth0 address="10.3.0.50/24" network="10.3.0.0/24" gateway="10.3.0.13" />
   </interfaces>
  </network>

  <peripherals>
   <keyboard layout="fr-latin9" />
  </peripherals>

  <kernel>
   <modules>
    <usb s="" />
    <bluetooth s="" />
    <hid s="evdev" />
    <sound s="snd-pcm-oss" />
    <sensors s="" />
    <dvb s="" />
    <ethernet s="forcedeth" />
    <arbitrary s="nls_utf8" />
   </modules>

   <module>
    <ath0 s="ath_pci" />
   </module>
  </kernel>

  <storage>
<!-- fstab -->
   <fstab>
<!--    <node mountpoint="/boot" device="/dev/sda1" options="noatime:noauto" /> -->
    <node mountpoint="/boot" device="/dev/sda1" fs="ext2" options="noauto" />
    <node mountpoint="/" device="/dev/sda3" fs="ext3" options="notail:noatime" />
    
<!-- This variable defines all the sources for your fstab. you could add
     "legacy", like in the example below, to make eINIT parse your /etc/fstab
     file as well as all the internal nodes.
     If you intend to do that, remove the nodes in this file for / and /boot
     (NOT all the others in einit.xml, /dev and the others are required!).
     Do note that the fstab format is rather limited in design, and that some
     options recognised by linux's mount(8) command will make einit's mounter
     fail - most notably that's the "loop" and "encryption=" options.

     NEVER remove the configuration fstab-source! -->
<!--    <source s="configuration:legacy" /> -->

<!-- HINT: this can help if you have issues with SCSI-devices being brought up only after einit is started
    <node mountpoint="/" device="/dev/ROOT" fs="ext3" options="noatime" before-mount="sleep 2" /> -->

<!-- example for other mountpoints -->
<!-- <node mountpoint="/usr/portage" device="/dev/sdb1" fs="reiserfs" options="noatime" />
    <node mountpoint="/usr" device="/dev/sdc1" fs="ext3" options="noatime" />
    <node mountpoint="/opt" device="/dev/sdb2" fs="ext3" options="noatime" /> -->

<!-- example for using md-volumes -->
<!-- <node mountpoint="/media/storage-3" device="/dev/md0" fs="reiserfs" before-mount="modprobe raid5; mdadm -A -a md /dev/md0" options="noatime" /> -->

<!-- example for using nfs-volumes -->
<!-- <node mountpoint="/media/storage-1" device="host:/media/storage-1" fs="nfs" />
    <node mountpoint="/media/storage-0" device="chronos:/media/storage-0" fs="nfs" /> -->

<!-- this should be a good idea... but apparently causes problems with beryl/compiz + not everyone has enough ram to do it this way -->
<!--    <node mountpoint="/tmp" fs="tmpfs" /> -->

<!-- use this if you don't have usb built into your kernel -->
<!--    <node id="usbfs-mount-node" mountpoint="/proc/bus/usb" fs="usbfs" options="critical" before-mount="modprobe usbcore" /> -->

   </fstab>
  </storage>

  <compatibility>
<!-- utmp/wtmp management: you'll need to enable the utmp service
     BUG: not implemented, yet -->
   <!-- <sysv utmp="yes" wtmp="yes" /> -->
  </compatibility>
 </configuration>

 <services>
<!-- both of the following would define a net-eth1 module, one using dhcp, the other with a static address from above -->
  <virtual>
   <module>
<!--   <shell id="shell-net-eth1-dhcp"
     based-on-template="template-shell-net-dhcp"
     interface="eth1" />-->
    <shell id="shell-net-eth0-static-iproute2"
     based-on-template="template-shell-net-static-iproute2"
     requires="kern-ethernet"
     interface="eth0" />

    <shell id="shell-xuser"
     name="Xuser (Xorg)"
     provides="xuser"
     pid="/var/tmp/xuser.pid"
     requires="net-lo:video:mount/local:kern-hid"
     enable='/bin/su - ${configuration_daemon_xuser} -l -c "/usr/bin/startx 2&gt; /dev/null"'
     disable='/bin/su ${configuration_daemon_xuser} -c "kill $(&lt;/var/tmp/xuser.pid)" ; /bin/true'
     restart="no"
     variables="configuration-daemon-xuser" />

    <shell id="shell-openvpnd"
     name="openvpnd"
     provides="openvpnd"
     pid="/etc/openvpn/routed-server/openvpn.pid"
     requires="network:mount/critical"
     enable="cd /etc/openvpn/routed-server;
     	modprobe tun;
	openvpn --config routed-server.conf --writepid openvpn.pid --daemon"
     disable="kill $(&lt;/etc/openvpn/routed-server/openvpn.pid);
     	${configuration_command_rmmod} tun; /bin/true"
     restart="yes" />

    <daemon id="daemon-urxvtd"
     name="urxvtd"
     provides="urxvtd"
     requires="mount/local"
     command='/bin/su - ${configuration_daemon_xuser} -l -c /usr/bin/urxvtd'
     restart='yes'
     variables="configuration-daemon-xuser" />


    <daemon id="daemon-xinetd"
     name="xinetd"
     provides="xinetd:inetd"
     requires="network:mount/critical"
     command="xinetd -dontfork" />

   </module>
  </virtual>

  <prefer>
   <net-eth0 s="shell-net-eth0-static-iproute2" />
   <syslog s="daemon-syslog-ng" />
   <!-- <x11 s="daemon-xuser" /> -->
   <kern-sound s="shell-kern-sound" />
   <kern-alsa s="shell-kern-audio-alsa" />
  </prefer>

  <alias>
<!-- service groups -->
   <network group="net-lo:net-eth0" seq="most" />
   <video group="kern-nvidia" seq="any-iop" />
   <audio group="alsa:kern-sound" seq="most" />
   <avahi group="avahi-dnsconfd" seq="any-iop" />
   <samba group="smbd:nmbd" seq="all" />
   <printing group="hpiod:hplip:cupsd" seq="all" />
   <share group="smbd:nmbd:openvpnd" seq="all" />
  </alias>

<!-- example alias: localmount is the same as mount/local -->
<!--  <alias id="localmount" s="mount/local" /> -->

<!-- example override: on regular systems, einit-tty will only need mount/system, but if you'd like
     to use quingy and have the terminals controlled using einit-tty, then you will need mount/critical
     if /usr is on its own partition (due to libquingy) -->
<!--  <override>
   <module id="einit-tty" requires="mount/critical" />
  </override> -->

<!-- example override, probably useful for lvm users:
     this should make einit mount mount/system-nodes, i.e. /dev, /sys and /proc
     before trying to mount the root-filesystem -->
<!--  <override>
   <module id="einit-mount-root" requires="mount/system" />
   <module id="einit-mount-system" requires="sysconf" />
  </override> -->
 </services>

 <mode id="boot">
  <enable mod="sysconf:mount/local:hostname:tty:keyboard:ipc:syslog:network" />
  <ttys s="tty1-regular" />
 </mode>

 <ttys s="tty2-regular:tty3-regular:tty4-regular:tty5-regular:tty6-regular" />

 <mode id="first" base="boot">
  <enable services="swap:xinetd" />
 </mode>
 
 <mode id="cons" base="boot:first">
  <enable services="audio:mpd:kern-arbitrary" />
 </mode>
 
 <mode id="default" base="cons:first:boot">
  <enable services="xuser:urxvtd:printing:share" />
 </mode>
</einit>