Ticket #308: patch-for-r2267.patch

File patch-for-r2267.patch, 16.0 KB (added by illth@…, 7 years ago)

patch-for-r2267.patch

  • ./daemon/bluetooth/rfcomm.ii

    old new  
    11 
    22service daemon/bluetooth/rfcomm { 
    3     need = system/initial system/mountroot daemon/bluetooth/hcid 
    4     exec start = @/usr/bin/rfcomm@ 
    5     exec_args start = -f /etc/bluetooth/rfcomm.conf bind all 
    6     exec stop = @/usr/bin/rfcomm@ 
    7     exec_args stop = -f /etc/bluetooth/rfcomm.conf release all 
     3    need = system/initial system/mountroot daemon/bluetooth/hcid; 
     4    exec start = @/usr/bin/rfcomm@; 
     5    exec_args start = -f /etc/bluetooth/rfcomm.conf bind all; 
     6    exec stop = @/usr/bin/rfcomm@; 
     7    exec_args stop = -f /etc/bluetooth/rfcomm.conf release all; 
    88} 
  • ./daemon/bluetooth/hid2hci.ii

    old new  
    1  
    21service daemon/bluetooth/hid2hci { 
    3     need = system/initial system/mountroot 
    4     exec start = @/usr/sbin/hid2hci@ 
    5     exec_args start = -0 
    6     exec stop = @/usr/sbin/hid2hci@ 
    7     exec_args stop = -1 
    8      
     2    need = system/initial system/mountroot; 
     3    exec start = @/usr/sbin/hid2hci@; 
     4    exec_args start = -0; 
     5    exec stop = @/usr/sbin/hid2hci@; 
     6    exec_args stop = -1; 
    97} 
    10  
  • ./daemon/bluetooth/hciattach.ii

    old new  
    1  
    21service daemon/bluetooth/hciattach/* { 
    3 #*/ 
    4     need = system/initial system/mountroot daemon/bluetooth/hcid 
    5     exec start = @/usr/sbin/hciattach@ 
    6     exec_args start = ${NAME} 
     2    need = system/initial system/mountroot daemon/bluetooth/hcid; 
     3    exec start = @/usr/sbin/hciattach@; 
     4    exec_args start = ${NAME}; 
    75} 
  • ./daemon/mpd.ii

    old new  
    22daemon daemon/mpd { 
    33    need = system/alsasound system/mountfs; 
    44    exec daemon = @/usr/bin/mpd@; 
    5     exec_args daemon = --no-create-db /etc/mpd.conf; 
     5    exec_args daemon = --no-daemon --no-create-db /etc/mpd.conf; 
     6    # why not pid_file? the file isn't static. i think, there's no service at the 
     7    # moment, which has a dependency on mpd. 
    68} 
  • ./daemon/apache.ii

    old new  
    11 
    22daemon daemon/apache { 
    3 #ifd linspire 
    4     need = system/initial system/mount_sys_fs net/lo; 
    5 #elsed 
    63    need = system/initial system/mountfs net/lo; 
    7 #endd 
    8  
    94    use = daemon/sshd daemon/mysql daemon/postgres system/netmount; 
    105    require_network; 
    116    #virtual_use = net dns logger; 
    127    exec daemon = @/usr/sbin/apache@; 
    13     #daemon_args = -DPHP; 
     8    exec_args daemon = -DPHP; 
    149    pid_file = /var/run/apache.pid; 
    1510} 
    1611 
  • ./daemon/dnsmasq.ii

    old new  
    11daemon daemon/dnsmasq { 
    22    need = system/initial system/mountroot system/modules system/hostname; 
    33    use = system/static-modules system/coldplug; 
     4    stdall = /dev/null; 
    45    exec daemon = @/usr/sbin/dnsmasq@; 
    5     exec_args daemon = -d; 
    6     # pid_file = /var/run/dnsmasq.pid; 
     6    # exec_args daemon = -d; 
     7    pid_file = /var/run/dnsmasq.pid; 
     8    respawn = yes; 
    79} 
    8  
  • ./daemon/postgres.ii

    old new  
    11service daemon/postgres/initdb { 
    22    need = system/initial system/mountfs net/lo; 
    33    script start = { 
    4      
    54#ifd pingwinek 
    6     DATA="/srv/pgsql" 
     5        DATA="/srv/pgsql" 
    76#elsed 
    8     # I'm not sure about this location 
    9     DATA="/var/lib/postgresql/data" 
     7        # I'm not sure about this location 
     8        # DK: i'm sure. (system: gentoo) 
     9        DATA="/var/lib/postgresql/data" 
    1010#endd 
     11    if [ ! -f $DATA/PG_VERSION ] 
     12    then 
     13        if [ ! -d $DATA ] 
     14        then 
     15            mkdir -p $DATA 
     16            chown postgres.postgres $DATA 
     17            chmod go-rwx $DATA 
     18        fi 
     19        # Initialize the database 
     20        su - postgres -c "/usr/bin/initdb --pgdata=$DATA > /dev/null 2>&1" < /dev/null 
    1121 
    12 if [ ! -f $DATA/PG_VERSION ] 
    13 then 
    14     echo -n "Initializing postgres database: " 
    15     if [ ! -d $DATA ] 
    16     then 
    17         mkdir -p $DATA 
    18         chown postgres.postgres $DATA 
    19         chmod go-rwx $DATA 
    20     fi 
    21     # Initialize the database 
    22     su - postgres -c "/usr/bin/initdb --pgdata=$DATA > /dev/null 2>&1" < /dev/null 
     22        exec test -f $DATA/PG_VERSION ] 
     23        # here was some output 
     24    }; 
    2325 
    24     if [ -f $DATA/PG_VERSION ]; then 
    25         echo "OK" 
    26         exit 0 
    27     else 
    28         echo "Error" 
    29         exit 1 
    30     fi 
    31     exit 0 
    32     }; 
    33      
    34     script stop = { 
    35     }; 
     26    script stop = { 
     27    }; 
    3628} 
    3729 
    3830service daemon/postgres { 
     
    5345#elsed 
    5446    exec_args stop = -D/var/lib/postgresql/data/ -s -m fast stop; 
    5547#endd 
     48    respawn = yes; 
    5649} 
  • ./daemon/squid.ii

    old new  
    1  
    21daemon daemon/squid { 
    32    need = system/initial system/mountfs net/lo; 
    43    require_network; 
    54    use = system/netmount; 
    65    #virtual_use = net dns logger 
    76    exec daemon = @/usr/sbin/squid@; 
    8     exec_args daemon = -N; 
    9     #pid_file = /var/run/squid.pid 
     7    # exec_args daemon = -N; 
     8    pid_file = /var/run/squid.pid; 
     9    respawn = yes; 
    1010} 
    11  
  • ./daemon/apache2.ii

    old new  
    1  
    21daemon daemon/apache2 { 
    3 #ifd linspire 
    4     need = system/initial system/mount_sys_fs net/lo; 
    5 #elsed 
    62    need = system/initial system/mountfs net/lo; 
    7 #endd 
    8  
    93    require_network; 
    104    use = daemon/sshd daemon/mysql daemon/postgres system/netmount; 
    115    #virtual_use = net dns logger; 
    126    exec daemon = @/usr/sbin/apache2@; 
    13     exec_args daemon = "-D PHP5 -k start"; 
     7    exec_args daemon = -D PHP5 -k start; 
    148    pid_file = /var/run/apache2.pid; 
    159} 
    16  
  • ./daemon/fcron.ii

    old new  
    11daemon daemon/fcron { 
    22    need = system/initial system/mountroot net/lo; 
    33    exec daemon = @/usr/sbin/fcron@; 
    4 #   daemon_args = 
     4    # exec_args daemon = ; 
    55} 
  • ./daemon/acpid.ii

    old new  
    11daemon daemon/acpid { 
    2 #ifd linspire 
    3     need = system/mount_sys_fs system/modules; 
    4 #elsed 
    52    need = system/mountfs system/modules; 
    6 #endd 
    7  
    83    use = system/discover system/coldplug; 
    94#ifd debian 
    105    env_file = /etc/default/acpid; 
    116#endd 
    127    script daemon = { 
    13  
    148        # Check for ACPI support on kernel side 
    159        [ -d /proc/acpi ] || exit 0 
    16          
     10 
    1711        LIST=`/sbin/lsmod|awk '!/Module/ {print $1}'` 
    1812         
    1913        # Get list of available modules 
  • ./daemon/rsyncd.ii

    old new  
    1  
    21daemon/rsyncd { 
    32    need = system/initial system/mountroot net/lo; 
    43    require_network; 
    5     exec daemon = @/usr/sbin/rsyncd@; 
    6     # daemon_args = --daemon 
    7     # pid_file = /var/run/rsyncd.pid 
     4    exec daemon = @/usr/sbin/rsync@; # there's no rsyncd 
     5    exec_args daemon = --daemon; # --no-detach # if no pid_file 
     6    pid_file = /var/run/rsyncd.pid; 
     7    respawn = yes; 
    88} 
  • ./daemon/mysql.ii

    old new  
    33    script start = { 
    44     
    55#ifd pingwinek 
    6     DATA="/srv/mysql" 
     6        DATA="/srv/mysql" 
    77#elsed 
    8     # I'm not sure about this location 
    9     DATA="/var/lib/mysql" 
     8        # I'm not sure about this location 
     9        DATA="/var/lib/mysql" 
    1010#endd 
    1111 
    12     if [ ! -d $DATA/db/mysql ] 
    13     then 
    14     echo -n "Initializing mysql database: " 
    15     if [ ! -d $DATA ] 
    16     then 
    17             mkdir -p $DATA 
    18             chown mysql.mysql $DATA 
    19             chmod go-rwx $DATA 
    20     fi 
    21     su mysql -c "/usr/bin/mysql_install_db 2>&1 > /dev/null" 
    22     if [ -f $DATA/db/mysql/db.frm ]; then 
    23         echo "OK" 
    24         exit 0 
    25     else 
    26         echo "Error" 
    27         exit 1 
    28     fi 
    29     fi 
    30     exit 0 
     12        if [ ! -d $DATA/db/mysql ] 
     13        then 
     14            if [ ! -d $DATA ] 
     15            then 
     16                    mkdir -p $DATA 
     17                    chown mysql.mysql $DATA 
     18                    chmod go-rwx $DATA 
     19            fi 
     20            su mysql -c "/usr/bin/mysql_install_db 2>&1 > /dev/null" 
     21        fi 
     22        exec [ -f $DATA/db/mysql/db.frm ] 
    3123    }; 
    3224     
    3325    script stop = { 
     
    4335#ifd pingwinek 
    4436    #pid_file = /srv/mysql/mysql.pid; 
    4537#elsed fedora 
    46     daemon_args = --defaults-file=/etc/my.cnf --pid-file=/var/run/mysqld/mysqld.pid 
     38    exec_args daemon = --defaults-file=/etc/my.cnf --pid-file=/var/run/mysqld/mysqld.pid 
    4739#elsed 
    4840    pid_file = /var/run/mysqld/mysqld.pid; 
    4941#endd 
  • ./daemon/postfix.ii

    old new  
    1  
    21daemon daemon/postfix { 
    32    need = system/initial net/lo; 
    43    require_network; 
    5         exec daemon = @/usr/sbin/postfix@; 
    6         exec_args daemon = start; 
    7         pid_file = /var/spool/postfix/pid/master.pid; 
     4    exec daemon = @/usr/sbin/postfix@; 
     5    exec_args daemon = start; 
     6    pid_file = /var/spool/postfix/pid/master.pid; 
     7    exec kill = @/usr/sbin/postfix@; 
     8    exec_args kill = stop; 
    89} 
    9  
  • ./daemon/entranced.ii

    old new  
    22    need = system/initial system/mountfs system/hostname net/lo system/modules; 
    33    use = system/static-modules system/coldplug system/netmount; 
    44    exec daemon = @/usr/sbin/entranced@; 
    5 #    daemon_args = -nodaemon; 
     5    # exec_args daemon = -nodaemon; 
    66    pid_file = /var/run/entranced.pid; 
     7    respawn = yes; 
    78} 
  • ./daemon/dovecot.ii

    old new  
     1daemon daemon/dovecot { 
     2    use = system/static-modules system/coldplug system/netmount net/lo; 
     3    require_network; 
     4    exec daemon = @/usr/sbin/dovecot@; 
     5    # exec_args daemon = -F; 
     6    pid_file = /var/run/dovecot/master.pid; 
     7} 
  • ./daemon/vixie-cron.ii

    old new  
    66    pid_file = /var/run/crond.pid; 
    77#endd 
    88    exec daemon = @/usr/sbin/cron@; 
     9    # exec_args daemon = -n; 
    910} 
  • ./system/iptables.ii

    old new  
     1service system/iptables { 
     2    need = system/initial system/mountfs system/hostname; 
     3    require_network; 
     4    script start = { 
     5        exec @/sbin/iptables-restore@ -c < /var/lib/iptables/rules-save 
     6    }; 
     7    script stop = { 
     8        #exec @/sbin/iptables-save@ -c > /var/lib/iptables/rules-save 
     9    }; 
     10} 
  • ./system/splashy.ii

    old new  
    11#TODO: Test if we have sarted with fb before starting splashy 
    22service system/splashy { 
    33    need = system/initial; 
    4 script start = { 
    5     test -x @/sbin/splashy@ || exit 0 
    6  
    7     spl_pidfile="/etc/splashy/splashy.pid" 
    8     spl_fifo="/etc/splashy/splashy.fifo" 
    9     if [ -r "/etc/default/splashy" ]; then 
    10        . /etc/default/splashy 
    11     else 
    12         echo "WARN: Missing /etc/default/splashy. Falling back to defaults $spl_fifo $spl_pidfile" 
    13     fi 
    14  
    15  
    16     if [ -r "/etc/init.d/splashy-functions.sh" ]; then 
    17         . /etc/init.d/splashy-functions.sh 
    18     else 
    19         echo "WARN: Missing /etc/init.d/splashy-functions.sh. Progressbar will not function correctly" 
    20     fi 
     4    script start = { 
     5        test -x @/sbin/splashy@ || exit 0 
    216 
    22     SPL_MSG="Starting $NAME boot sequence" 
     7        spl_pidfile="/etc/splashy/splashy.pid" 
     8        spl_fifo="/etc/splashy/splashy.fifo" 
     9        if [ -r "/etc/default/splashy" ]; then 
     10           . /etc/default/splashy 
     11        else 
     12            echo "WARN: Missing /etc/default/splashy. Falling back to defaults $spl_fifo $spl_pidfile" 
     13        fi 
     14 
     15        if [ -r "/etc/init.d/splashy-functions.sh" ]; then 
     16            . /etc/init.d/splashy-functions.sh 
     17        else 
     18            echo "WARN: Missing /etc/init.d/splashy-functions.sh. Progressbar will not function correctly" 
     19        fi 
    2320 
    24     @start-stop-daemon@ --start --quiet --pidfile $spl_pidfile \ 
    25     --exec @/sbin/splashy@ -- boot 2> /dev/null 
     21        SPL_MSG="Starting $NAME boot sequence" 
    2622 
    27     @ngc@ -S "splashy,boot" 
     23        @start-stop-daemon@ --start --quiet --pidfile $spl_pidfile \ 
     24        --exec @/sbin/splashy@ -- boot 2> /dev/null 
    2825 
    29 }; 
     26        @ngc@ -S "splashy,boot" 
     27    }; 
    3028 
    3129#the stop script is called on shutdown 
    3230#it will start splashy again to show the "shutdown complete" progress bar 
    33 script stop = { 
    34     test -x @/sbin/splashy@ || exit 0 
    35  
    36     spl_pidfile="/etc/splashy/splashy.pid" 
    37     spl_fifo="/etc/splashy/splashy.fifo" 
    38     if [ -r "/etc/default/splashy" ]; then 
    39        . /etc/default/splashy 
    40     else 
    41         echo "WARN: Missing /etc/default/splashy. Falling back to defaults $spl_fifo $spl_pidfile" 
    42     fi 
    43  
     31    script stop = { 
     32        test -x @/sbin/splashy@ || exit 0 
    4433 
    45     if [ -r "/etc/init.d/splashy-functions.sh" ]; then 
    46         . /etc/init.d/splashy-functions.sh 
    47     else 
    48         echo "WARN: Missing /etc/init.d/splashy-functions.sh. Progressbar will not function correctly" 
    49     fi 
     34        spl_pidfile="/etc/splashy/splashy.pid" 
     35        spl_fifo="/etc/splashy/splashy.fifo" 
     36        if [ -r "/etc/default/splashy" ]; then 
     37           . /etc/default/splashy 
     38        else 
     39            echo "WARN: Missing /etc/default/splashy. Falling back to defaults $spl_fifo $spl_pidfile" 
     40        fi 
     41 
     42        if [ -r "/etc/init.d/splashy-functions.sh" ]; then 
     43            . /etc/init.d/splashy-functions.sh 
     44        else 
     45            echo "WARN: Missing /etc/init.d/splashy-functions.sh. Progressbar will not function correctly" 
     46        fi 
    5047 
    51     SPL_MSG="Starting $NAME shutdown sequence" 
     48        SPL_MSG="Starting $NAME shutdown sequence" 
    5249 
    53     @start-stop-daemon@ --start --quiet --pidfile $spl_pidfile \ 
    54     --exec $DAEMON -- boot 2> /dev/null 
     50        @start-stop-daemon@ --start --quiet --pidfile $spl_pidfile \ 
     51        --exec $DAEMON -- boot 2> /dev/null 
    5552 
    56     @ngc@ -S "splashy,shutdown" 
    57  
    58 }; 
     53        exec @ngc@ -S "splashy,shutdown" 
     54    }; 
    5955} 
    6056 
    6157service system/splashy/chvt { 
     
    6965        done 
    7066        [ "${x_vt}" -gt 0 ] 2> /dev/null 
    7167        [ "$?" -gt 0 ] && exit 0 
    72         @/usr/bin/chvt@ ${x_vt} 
     68        exec @/usr/bin/chvt@ ${x_vt} 
    7369    } 
     70    #script stop = { 
     71        #if [ -r "/etc/default/splashy" ]; then 
     72            #. /etc/default/splashy 
     73        #else 
     74            #echo "WARN: Missing /etc/default/splashy. Falling back to defaults $spl_fifo $spl_pidfile" 
     75        #fi 
     76        #splashy_cmd_send "exit" 
     77        exec #@ngc@ -S "splashy,shutdown" 
     78    #}  
    7479} 
    75  
    76 #stop { 
    77 # 
    78 #    if [ -r "/etc/default/splashy" ]; then 
    79 #       . /etc/default/splashy 
    80 #    else 
    81 #        echo "WARN: Missing /etc/default/splashy. Falling back to defaults $spl_fifo $spl_pidfile" 
    82 #    fi 
    83 # 
    84 #    splashy_cmd_send "exit" 
    85 #    @ngc@ -S "splashy,shutdown" 
    86 #}  
    87  
    88  
    89  
  • ./system/audit.ii

    old new  
    33    exec start = @/etc/init.d/auditd@; 
    44    exec_args start = start; 
    55    exec stop = @/etc/init.d/auditd@; 
    6     stop_args  = stop; 
     6    exec_args stop = stop; 
    77} 
  • ./debug/pidfile-daemon.ii

    old new  
    11daemon debug/pidfile-daemon { 
    22    respawn = no; 
    3     daemon = @/bin/sh@; 
    4     daemon_args = /etc/initng/debug/pidfile-daemon.sh; 
     3    exec daemon = @/bin/sh@; 
     4    exec_args daemon = /etc/initng/debug/pidfile-daemon.sh; 
    55    pid_file = /tmp/initng-pidfile-debug.pid; 
    66} 
  • ./debug/bug197.ii

    old new  
    11service debug/bug197/tty1 { 
    2     exec start     = /bin/echo; 
    3     exec_args start = "Here should be tty1 - but it isn't!"; 
     2    exec start = /bin/echo 
     3    exec_args start = "Here should be tty1 - but it isn't!" 
    44} 
    55 
    66service debug/bug197/* { 
    7     exec start      = /bin/echo; 
    8     exec_args start = " the common ${NAME}"; 
     7    exec start = /bin/echo 
     8    exec_args start = " the common ${NAME}" 
    99}