Commit graph

34 commits

Author SHA1 Message Date
Sean McNeil
102f6d2c64 Set permissions properly for any ALSA device under /dev/snd 2009-09-15 10:17:35 -07:00
Ben Gruver
dc816d5dcd Allow an onrestart command to stop the current service
For example,

service recovery /sbin/recovery
	onrestart start loadkeys
	onrestart class_start con
	onrestart stop recovery

Previously, if you had a service like the above, the "onrestart stop
recovery" clause would not have any effect, because the restart flag
would be re-set after the stop command had executed.

This is similar to a service with the "oneshot" keyword, with the critical
difference being that it executes the other onrestart commands when the
service dies.
2009-08-27 07:58:38 -07:00
Jay Freeman (saurik)
e7cb137f32 added chdir/chroot commands to init for mount switching/pivoting 2009-08-27 07:43:28 -07:00
Jay Freeman (saurik)
9f28bde9eb Trivial implementation of init's import command. 2009-08-27 07:40:19 -07:00
Android Code Review
12a5b8804c Merge change 2903
* changes:
  completed implementation of "trigger" for init
2009-08-27 07:36:36 -07:00
Chuck Tuffli
1e070846f8 Fix incorrect check for LOG_UEVENTS
LOG_UEVENTS is a boolean value as defined in system/core/init/init.h.
Therefore, code should use an #if check and not an #ifdef check as the
macro will always be defined.
2009-08-26 09:26:46 -07:00
Jay Freeman (saurik)
11e1c42df6 completed implementation of "trigger" for init 2009-08-25 13:00:11 -07:00
Jean-Baptiste Queru
96d58f4f52 Merge korg/donut into korg/master 2009-07-25 18:07:41 -07:00
Chia-chi Yeh
88dc657d50 Add device, property, directory, and file permissions for VPN. 2009-06-19 15:53:28 +08:00
Iliyan Malchev
fc0182eb1d add support and proper permissions for /dev/msm_camera/
Signed-off-by: Iliyan Malchev <malchev@google.com>
2009-05-26 16:45:51 -07:00
San Mehat
d4cdd13f6f init: Clean up dynamic argument handling for services
Signed-off-by: San Mehat <san@google.com>
2009-05-20 09:52:16 -07:00
San Mehat
f24e252903 init: Add the ability to start services with dynamic arguments.
To add arguments dynamically to a service, start the service like so:

    setprop ctl.start service_to_run:arg1 arg2 arg3...

    To start a service with *no* dynamic arguments, start the service normally:

    setprop ctl.start service_to_run

    Dynamic arguments are only supported on 'oneshot' services

Signed-off-by: San Mehat <san@google.com>
2009-05-19 13:33:07 -07:00
San Mehat
4a6f2321e7 init: Create new 'vpn' user/group and set owner of '/dev/tun' to it.
Signed-off-by: San Mehat <san@google.com>
2009-05-15 10:40:29 -07:00
San Mehat
c83cd879d4 init: Fix heap corruption for services with arguments
The 'args' array *must* be the last entry in the structure.

This fixes a longstanding issue (apparently since tc3) where
a service with an argument would corrupt the heap. The more
arguments, the more corruption :|. This will probably also end up
making key-code bound services more reliable (ie: bugreports triggered
via the keyboard)

Signed-off-by: San Mehat <san@google.com>
2009-05-14 15:08:04 -07:00
Mike Lockwood
b3779558dc init: Fix some broken code that did not cause problems until switching to gcc 4.4
Signed-off-by: Mike Lockwood <lockwood@android.com>
2009-05-08 14:27:42 -04:00
Android (Google) Code Review
2780827193 Merge change 1005 into donut
* changes:
  Make the /dev/qemu_trace device readable and writable by all.
2009-05-06 15:20:29 -07:00
Dima Zavin
770354d7e6 init: Fix segfault when log_write() was missing an arg to format.
Also, flag log_write() as a printf-like beast to gcc.

Signed-off-by: Dima Zavin <dima@android.com>
2009-05-05 18:35:00 -07:00
Jack Veenstra
4a762357d0 Make the /dev/qemu_trace device readable and writable by all.
This is needed so that the Dalvik interpreter can add information
about Java method entry/exit to the traces when running in the qemu
emulator.
2009-05-05 11:48:17 -07:00
Jean-Baptiste Queru
83b65486be Merge commit 'remotes/korg/cupcake' into merge
Conflicts:
	init/devices.c
	libpixelflinger/Android.mk
2009-03-18 09:29:29 -07:00
The Android Open Source Project
e037fd7e19 auto import from //branches/cupcake_rel/...@138607 2009-03-13 13:04:37 -07:00
The Android Open Source Project
dd7bc3319d auto import from //depot/cupcake/@135843 2009-03-03 19:32:55 -08:00
The Android Open Source Project
e54eebbf1a auto import from //depot/cupcake/@135843 2009-03-03 18:29:04 -08:00
The Android Open Source Project
261ed7551e auto import from //branches/cupcake/...@132276 2009-02-19 10:57:36 -08:00
The Android Open Source Project
4a4c9f6f98 Merge branch 'cupcake' 2009-01-22 00:16:17 -08:00
The Android Open Source Project
dcf3ce247e auto import from //branches/cupcake/...@127436 2009-01-22 00:13:45 -08:00
The Android Open Source Project
038862e152 Merge branch 'cupcake' 2009-01-09 18:04:23 -08:00
The Android Open Source Project
5ae090ed94 auto import from //branches/cupcake/...@125939 2009-01-09 17:51:25 -08:00
Jean-Baptiste Queru
77d0c65b95 Merge commit 'remotes/korg/cupcake'
Conflicts:
	init/devices.c
	logwrapper/logwrapper.c
	mountd/AutoMount.c
2008-12-19 08:15:15 -08:00
The Android Open Source Project
35237d1358 Code drop from //branches/cupcake/...@124589 2008-12-17 18:08:08 -08:00
Ivan Djelic
165de92bf1 show error message when exec fails during service startup 2008-12-02 17:58:36 -08:00
Xiaopeng Yang
5bb44c8ea2 Create sound device nodes in /dev/snd/. 2008-12-02 17:54:51 -08:00
Jay Freeman (saurik)
e520d03616 Added support for loop@/path/to/filename to init's mount.
In keeping with the pattern of mtd@partition, I have added loop@path as a way to specify a loopback device. This way you can do things like mount directories in /system using cramfs from a file otherwise on /system (just one example oof how I'm using it). I specifically went with loop@ rather than adding this feature as a flag as the flags system is designed to set bits in the flags argument to mount: using loop@ fit the model in a much simpler manner and actually feels "correct".

This is a better version of the previously submitted 4045 that also refactors the mtd@ case. The reason for this is that I received comments that I should check for errors and return errors rather that do work in the case of success and fall through, but the mtd@ case wasn't doing that either and it became awkward to design the function so that it was half in one style of error handling and half in another. I also made certain to use inequality comparisons for Unix's -1 error returns rather than checking for -1, refactored my large if statement so as not to have danling parentheses, and disassocited the loop device on mount failure.
2008-11-20 18:38:36 +00:00
Iliyan Malchev
3088ff8d39 Set permissions for /dev/msm_snd.
Signed-off-by: Iliyan Malchev <malchev@google.com>
2008-10-29 16:08:18 -07:00
The Android Open Source Project
4f6e8d7a00 Initial Contribution 2008-10-21 07:00:00 -07:00