Programming :: Getting A INIT Script To Work?

Feb 23, 2011

This is my first init script, so far, it atleast starts the daemon but it fails at creating a pid, so later on I can use to, to either stop it or reload it. Here's the current code: Further more, the script returns ok that it started the pid, when in fact, the pid fails in the background, this script needs MUCH improvement, some help would be nice to fix this script. :/

Code:
#! /bin/sh
### BEGIN INIT INFO
# Provides: znc
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6

[Code]...

View 2 Replies


ADVERTISEMENT

Programming :: Init Scripts In /etc/init.d?

Sep 17, 2010

I have written an init script and placed it in /etc/init.d/ directory.What I would like to know is, will the script run automatically or we need to install the script using "install_initd" command.If I have to invoke this command manullay, what will be the best place to do this ? Can I add this to "/etc/init.d/rcS" file

View 6 Replies View Related

Ubuntu :: Init / Telinit Does Not Seem To Work?

Jan 26, 2010

I just installed my machine with ubuntu 9.04. When I run "init 3" or "telinit 3", nothing happens. I need to exit the X server to install a video driver.

View 3 Replies View Related

Fedora Installation :: Init 3 Doesn't Work In 10?

Apr 15, 2009

su to root,

init 3

no errors, no nothing acts like it take the command, but nothing happens.

trying to install nvidia drivers which won't run unless all the xwindows are shut down.

View 4 Replies View Related

General :: Kill XServer (Init 3 / 5 Does Not Work)

Feb 23, 2011

I'm running Linux Mint 10, although I've had this same issue with other variants of Linux. I've been told/found while researching that if the X server hangs or otherwise errors, one can drop to a root prompt, usually at another tty, and execute init 3 (to drop to single user mode) and then init 5 to return to the default, graphical session. Needless to say, I've tried this before in multiple configurations on multiple machines to no avail.

The only feedback I receive form executing those two commands is a listing of VMWare services (from a kernel module) that are stopped and then restarted. If I run startx (either before or after init 3), then I am told that the xserver is still running and that I should remove /tmp/.X0-lock. Having tried that, it removes that error message, but claims that the xserver cannot be attached as another instance is running. How do I kill the xserver completely? Can I killall some process name?

View 2 Replies View Related

General :: Switching Init Levels Does Not Work?

Jan 21, 2010

I have CentoS 5.3 and switching init levels does not work.when I login console mode,doesnot work ctrl+F7 key...and on the contrary.when Im in graphical mode, does not work ctrl+F1...ctrl+F6 keys.

View 4 Replies View Related

Fedora :: 13 - Use The New /etc/sysconfig/init - Agetty Doesn't Work Any More?

Aug 19, 2010

What a nuisance after upgrading from Fedora 12 to Fedora 13 the terminal initialisation and the running of agetty agetty doesn't work any more. Same for printer configurations. Apparently this should now be done in /etc/sysconfig/init but where is the documentation? how to use the new /etc/sysconfig/init to do what the event.d scripts used to do.

View 2 Replies View Related

General :: Can't Get Mount To Work In /etc/init.d/rc.local Or Fstab

Jul 10, 2010

I'm running XBMC media center which is built on Ubuntu and I'm trying to mount a network share, but I can't seem to automate it. If I manually run:

Code:

mount -t cifs -o file_mode=0777,dir_mode=0777 //192.168.1.20/disk7/xbmc_thumbs/Thumbnails /home/kevin/.xbmc/userdata/Thumbnails

The mount is created and everything works fine. But obviously the mount eill be lost on the next boot. A few months back, when I was running a previous version of XBMC and first instructed on how to do this, I was told to put that command in /etc/init.d/rc.local so the mount would automatically be created at boot. I did and it worked. The other day I upgraded to a new XBMC build (which is built on the newer Lucid Ubuntu) and while the same command creates the mount, putting it in /etc/init.d/rc.local does not create it on boot. Someone suggested the fstab was the better place to create the mount. So I inserted the following in /etc/fstab:

Code:

//192.168.1.20/disk7/XBMC_thumbs/Thumbnails /home/kevin/.xbmc/userdata/Thumbnails cifs file_mode=0777,dir_mode=0777 0 0

That doesn't work either. What am I doing wrong and how can I get this mount auto-created on boot?

View 4 Replies View Related

Slackware :: Keyboard And Mouse Do Not At All Work In Init 4 Mode?

Feb 26, 2010

Well, just as the title of this post says, I am having keyboard and mouse problems. Here's the storyMy friend Cody wanted me to take a look at his computer for him (I'm sort of known as a Linux nerd in my school lol) because his keyboard and mouse do not at all work in init 4 mode. I've tried reconfiguring the keyboard and mouse by trying a different module. I've even tried reconfiguring X alltogether by running "X -configure", which didn't work

View 3 Replies View Related

Programming :: Init.d Script Does Not Return Prompt?

Jul 9, 2010

I have an a script in /etc/rc.d/init.d script that I would like to start and stop my sample application. I have named my script "foo", then I can start running my application my typing $ foo start but this does not return [OK] like other scripts do and does not return to shell prompt. My application is basically like this

int main()
{
do {
printf("Hi
");
sleep(1);
} while (1);
}

What is missing from my application that prevents from returning the shell prompt?

View 3 Replies View Related

Programming :: Init Script Differently When Run On Machines In The UK Vs US?

Jul 19, 2011

I have an initscript that behaves slightly differently in the UK than it does in the US. Not a huge issue, but I'd like to know why and how to fix it. I imagine it has something to do with localization, but I'm at a loss as to what it could be, as it's just bash.

in the UK:
Code:
[root@server ~]# /etc/init.d/worker
status}
in the US:

[Code]...

View 6 Replies View Related

Ubuntu :: Computer Seemed To Be Frozen - Reboot - No Init Found. Try Passing Init - Bootarg"

Jan 1, 2011

I've been dual booting 10.10 with Windows7 for about a month. Today is the first time I've encountered a serious problem.

This morning, nothing functioned properly after trying to open several programs. The computer seemed to be "frozen", although the mouse was working fine.

I decided to reboot, but then encountered an even bigger problem.

It failed to boot and got this message: no init found. try passing init= bootarg

The problem now is that it requires a Live CD session and I keep getting this: GLib-WARNING **: getpwuid_r(): failed due to unknown user id (0)

In case it matters, I didn't install 10.10 from an ISO, I just upgraded from 10.04.

View 2 Replies View Related

Programming :: Difference Between Init And Main Function In A Process

Jul 12, 2010

I have a project in which many processes run. p1,p2,p3.

->There are some .so files are included in some process when needed example ppp.so in process p1 (when ppp is needed and will go like a plugin) but it has a init () function how a process includes a init() function ?

->process p1 has main function i.e main()

->so evry process has main() right ?

what is the difference between init () and main () functoins. where is init () used and how many init() a process van have ?

View 3 Replies View Related

Programming :: Startup Scripts In Init.d Disappear After Boot Up

Jul 8, 2010

I'm running a Debian based Linux compiled for ARM9 hardware. I am trying to auto start a process on bootup but occasionally I find that my startup script becomes empty (i.e. the file still exists but has not data). The script is located in /etc/init.d/S91-sercom

Here's the script:

Code:
#!/bin/sh # /etc/init.d/S91-sercom
# Start the Serial Communication Protocol Program at boot
echo "Starting Serial Communication"

[Code]....

View 1 Replies View Related

Ubuntu :: Error - No Init Found - Try Passing Init=bootarg

Jan 20, 2010

Ubuntu 9.10 will not boot! System froze this morning, I restarted and it is now failing to boot. Starts loading grub and I get this message:

mount: mounting /dev/disk/by-uuid/04aa3697-7bc0-45b5-b86a-77a1e6534bd5 on /root failed: invalid argument
mount: mounting /sys on /root/sys failed: no such file or directory
mount: mounting /dev on /root/sys failed: no such file or directory

[code]....

I booted with 9.04 LiveCD discovered the drive could not be mounted-ran fsck -ln and it told me the drive has no valid partition table. I have had intermittent problems mounting flash drives before this, so I'm kind of worried it might be a hardware issue.Also have files on that drive I would rather not lose, so reinstalling is hopefully a last resort.

View 9 Replies View Related

Programming :: Use Gtk_window_set_gravity Function To Init Window Location On Screen?

Oct 18, 2010

I use gtk_window_set_gravity function to init window location on screen. I use different parameter value in Gravity,window location always at top left of screen.I use ubuntu 10.04. Code by follow:

GtkWidget * window, *label;
gtk_init(p_argc, p_argv);
window = gtk_window_new(GTK_WINDOW_TOPLEVEL);

[code]....

View 2 Replies View Related

Programming :: Kernel Panic - Not Syncing: Attempted To Kill Init

Oct 12, 2010

am trying to interface ade7758(adc) to at91sam9261...i have written a sample code which registers an spi driver and sends an address to ade7758 and receives a data...every thing is fine.My device is registered but kernel is giving a crash message....below is the message....

[Code]...

View 6 Replies View Related

Server :: Diffrence /etc/init.d And /etc/init.d/rc.d Scripts?

Jul 29, 2010

me the difference between /etc/init.d scripts and /etc/init.d/rc?.d scripts.

View 3 Replies View Related

Debian :: INIT : Cannot Execute /etc/init.d/rc?

May 7, 2011

I'm trying to boot Emdebian lenny on my compact flash and it shows the following errors during boot time :

Code:
Mounting local filesystems ... done .
/etc/rc.d/S35mountall.sh : line 45 : uname : command not found .

[code]...

View 3 Replies View Related

Software :: Stuck In Init 3 Although Indicates Its Init 5?

Mar 17, 2011

openSUSE 10.3 on Itronix IX260+ Stuck on command line, init 3, and all attempts at graphic init 5 fail. Get these messages:(EE) No devices detected; Fatal screen error: no screens found; AIGLX disabled Primary Device is PCI 01:00:0kernel:device-mapper:multipath round-robin:version 1.0.0 loaderkernel:device-mapper:table:253:0:multipath: error getting device
kernel:device-mapper:ioctl: error adding target to tableProblem would seem to be with the device-mapper, but have no idea how to fix it.

View 3 Replies View Related

Ubuntu :: Wont Boot - "no Init Found. Try Passing Init=bootarg"

Jan 31, 2011

While I was using my computer a few days ago, the terminal stopped working properly, so I tried to reboot, and when it started up again it wouldn't boot and said "no init found. try passing init=bootarg"

This has happened twice before, so I really need to figure out what keeps happening, otherwise I can't continue to use linux. i reinstalled both times before. i think that this is caused by a process that prevents me from using the hard drive, because when I try to check the disk in the terminal or in gparted, it says Device or resource busy while trying to open /dev/sda1. Filesystem mounted or opened exclusively by another program?

Also, in the disk utility, in the lower right corner of the filesystem it has a spinning "loading wheel".(i'm not sure if that means anything)

I am using ubuntu 10.10, but am not sure what kernel I am using, but i tried a few different kernel options(there's three of them at start up). safe mode does not work either.

View 3 Replies View Related

General :: Kernel Panic - Not Syncing - No Init Found - Try Passing Init - Option To Kernel

Apr 19, 2011

Im am building a Linux distro. It will be very tiny and fast.

I only have a minimal linuxkernel (bzImage) who is 1,2 mb big. And then I have Busybox who is 174,6 kb big.

The commands in busybox is: cd, ls, mkdir, rmdir, wget, httpd, clear, rm, poweroff, halt, reboot, fdisk, mount, umount, free, and cp.

When I compiled the kernel i use initramfs/initrd function and point it to a folder where initrd/initramfs source is.

The kernel works OK with others initramfs/initrd files. But not with my own.

Quote:

Here is how the end of the kernelcomplie look like.

Quote:

Here is my init file who is the initrd/initramfs source.

Quote:

The initramfs folder contains "bin" (folder) and "init" a file. No more.

The problem is that the kernel cannot find/read init file.

View 4 Replies View Related

Programming :: Difference Between Init.rc Process And Normal Process?

Mar 31, 2011

Is there any difference in cpu usage for process in init.rc(runs automatic when boot is happened) and manually running process. Will these both have same priority by default...?

View 1 Replies View Related

Programming :: How Does Cin Work?

Mar 1, 2010

This code will execute fairly well, however, if you enter multiple values that are not A/a or b, 1 or 2, then when the program resets, cin does not behave normally. Instead of waiting for input, it acts as if it has already been given input, and the input is the next character from the one entered.For example, entering "345" and submitting it at the (cin >> a line will individually pass the values 3, 4, and 5 through the if/else and switch statements, rather than only inputting the first value, 3, or all the values, 345.

If you enter, for example, "3343634563456345", then it will pass through the do{}while(); loop 16 times, with each pass having a = to the next character value. The cin >> a; is performed, and this is verifiable in GDB, however it never asks for input from stdin, and instead gets its input from somewhere else. How can I observe that, and what is going on?Furthermore, if you enter "cdefghijklmnopqrstuvwxyzab", it will pass through 25 times, and stop at a, which goes through the switch, and ends at a case statement that does not adjust the false value of mreset, thereby allowing the program to end.

View 10 Replies View Related

Programming :: How Does The Assert() Work

May 22, 2010

I got a problem about assert() on linux/unix && gcc , I wanna know how does assert() work,I mean that how does the assert() make the programme exit? Is assert() send SIGSEGV to programme or called function exit() or other ways?

View 4 Replies View Related

Programming :: Cc And Gcc Compilers Don't Work

Nov 14, 2010

I've tried instralling the c and c++ compilers on my fedora 13 machine and none of them seem to work. For example. i have this extremely simple c program that i try to compile and nothing works.

Code:

#include "stdio.h"
printf("Hello World"); when i type Code: [####localhost Desktop]# cc hello.c i get this error Code: hello.c:3: error: expected declaration specifiers or �...� before string constant
hello.c:3: warning: data definition has no type or storage class

[code]...

i've tried intalling a group of developers tools using yum groupinstall "Developers Tools" and nothing......

View 3 Replies View Related

Programming :: Use The Seq Command But Can't Get It To Work?

Mar 24, 2011

I have a script that will build a list of hosts and it works fine Code: for ((i=$START; i<=$END; i++)); do echo "$NAME$i"; done But I need it to build the START and END on different number formats (i.e. 1 -> 10, 01->10, 001 ->010)

I am trying to use the seq command but can't get it to work quite right with the -w flag in the following Code: for ((myseq=$START; myseq<=$END; myseq ++)) do echo "$NAME${myseq}" done I am fully aware that this syntax is probably wrong, and need to know how to correct it.

View 1 Replies View Related

Programming :: Can't Get The OR Operator To Work?

Apr 18, 2011

I'm having a bit of trouble getting the OR operator to work.This is the code that I have:

global.php:
Code:
$vars["admin link"] = "<a href='/path/to/admin.php'>Admin</a>";
$vars["admin ip"] = "xxx.xxx.xxx.xx1";
$vars["admin ip2"] = "xxx.xxx.xxx.xx2";

[Code]...

View 7 Replies View Related

Programming :: Cc And Gcc Commands Don't Work

Nov 14, 2010

I've tried instralling the c and c++ compilers on my fedora 13 machine and none of them seem to work. For example. i have this extremely simple c program that i try to compile and nothing works.

Code:
#include "stdio.h"
printf("Hello World");

[Code]....

View 6 Replies View Related

Programming :: How Do Cookies Work?

Mar 31, 2010

I understand that a website can set a cookie which means a little text file with a no. in it will be created on the client side, and then the no. will get sent to the server with every visit. But how is this used to customize a page? Does this mean that a MySQL database *has* to be created, which can be used to match up that no. with a particular login name, for instance? How exactly is this pulled off?

View 3 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved