Programming :: Have Several Scripts In /etc/rcS.d/ Directory Which Are Required To Run On Start Up
Sep 20, 2010
I have several scripts in /etc/rcS.d/ directory which are required to run on start up.Now I have written a new script, and I want it to be run during the system start up itself (Not in any runlevel). SoI have given the default start as,# Default Start :SBut when I use the command : "update-rc.d test_script.sh defaults".....it is creating symbolic links to/etc/rc0.d /etc/rc1.d ..../etc/rc6.d.But I actually need a symbolic link in the /etc/rcS.d/ directory.Is there is any way to achieve this ( I tried manullay creating a link in /etc/rcS.d, but that is not running the script on system start up).
View 1 Replies
ADVERTISEMENT
May 28, 2011
I'm setting up a Python-based webserver on my Debian box. Setup: The Debian OS is VM based, but I've switched the VirtualBox from NAT to Bridged. IP of the VM setup = 192.168.1.7 (per my router's admin screen or ifconfig). I've succesfully set up my router's port forwarding for both ssh and HTTP. I've successfully set up my router's dynamic dns using [URL].
Regardless of the specific Python webserver I'm using (Django, CherryPy, standard library), I have to start the webserver @ 192.168.1.7:80 using sudo. Otherwise I get an error about not having permission to access the port. None of the webserver tutorials mention needing to use sudo when specifying an ip:port.
Question: why do I need to use sudo to start these webservers? Is it an indication that I shouldn't be using 192.168.1.7? Or that I'm not setting a config file properly somewhere?
View 2 Replies
View Related
Jan 16, 2011
As part of a package manager I am trying to build I am at the stage of checking if my system has the latest packages installed. To this end I would like some feedback on pieces that could be improved or perhaps alternatives that I can utilise. To the aficionados' of Perl, Python and the like, whilst I know these may be better suited to the task, the package manager is currently completely bash so I am trying to stay within this paradigm for the moment. I have edited this version slightly as it normally would tie in with the rest of my scripts which are not shown here. If there are any questions please ask and I will answer to the best of my ability:
[Code]...
View 7 Replies
View Related
Feb 3, 2011
it's been a long time since I did coding in C, but thought to pick up a very old project again, just to show off what I have been working on ten years ago.I deducted my problem as follows:
Code:
#include <stdio.h>
#include <stdlib.h>
#define bit1 1
#define bit2 2
[Code]...
Why is it saying that bar->act is not a valid lvalue while both bar->act and the bit are cast to (long long)?
View 6 Replies
View Related
May 31, 2011
I have written a script to run commands on remote servers, it is working fine. But when I am running "sudo commands" on the remote servers, it asks for me password after prompting for ssh password. I am unable to automate this password prompt (which is just after ssh password prompt). This is the function I am using to provide passwords
Code:
pass ()
{
cd $DIR/"$dt1"_"$dt"
/usr/bin/perl << 'EOF'
use strict;
[code]....
I want the same function to be used , when it expects for sudo passwords for any of the below lines:
Code:
[sudo] password for vikas: orPassword: This is my "cmd" file passed in pass () function.
Code:
ssh -t -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no 192.168.1.100 "bash rcmds"
This is my script output
Quote:
[vikas@box1 ~]$ ./rscript.sh
++ rm -rf /home/vikas/May_31
++ mkdir -p /home/vikas/May_31
++ set +x
[code]....
how to automate the password prompt required for sudo commands.
View 8 Replies
View Related
May 20, 2011
The Slackbook reads:
Quote: The precompiled Slackware kernels are available in the /kernels directory on the Slackware CD-ROM or on the FTP site in the main Slackware directory. I am unable to reach it, what's the proper login?
[Code]....
View 3 Replies
View Related
Jun 10, 2010
I'm in the process of debugging and compiling about sixty FORTRAN 95 programs and could use a little bit of your help before my brain is fried and fingers are cramped. Thanks for your time!
I receive the following errors:
Here is my code:
View 5 Replies
View Related
Jul 4, 2010
I've recently starting dabbling with python and gtk/cairo bindings. Can anyone point me to a quick and easy way to convert a colour value from hex (e.g. #FF8000) into the format required by the set_source_rgb function?E.g. I have this:
Code:
cr=area.window.cairo_create()
cr.set_source_rgba(0.5,0.5,0,0.8)
[code]....
View 3 Replies
View Related
Jan 3, 2009
After i try to find logfiles follow date/month/year. i want copy this files to another directory with name's directory is time you find(date/month/year).
View 4 Replies
View Related
Jul 1, 2010
I installed OpenCV and am trying the example programs. When I try to compile like in the tutorial it is not finding highgui.h.I have 64 bit Mint if that helps at all
View 3 Replies
View Related
Sep 28, 2010
i want a process that can operate as both a TCP echo server and a UDP echo server. The process can provide service to many clients at the same time, but involves a single process that does not start up any other threads.
View 3 Replies
View Related
May 19, 2011
I am having troubles starting superPI benchmark test on Linux. I have it in a file named 'super pi' so ./super_pi doesn't work. I can't figure it out how to do it. In cmd(Win) I would do it like this
cd C:/super pi/
super_pi
If the file would be located in C:/super pi/ The problem is I somehow can't tell the path to the file.
View 9 Replies
View Related
Jun 25, 2010
For any custom application I create which needs to run at startup, what I normally do is have an entry in my /etc/init.local that executes the app.Now if I just putCode:/data/app/prod/start And the app writes data to relative paths, it will be writing data all over the system. Is there a method of starting a script so it is aware of the folder it is in? Sure I can do "cd [folder]" then start the app, but wondering if there's a better way.
View 1 Replies
View Related
Apr 7, 2010
I type in /etc/init.d/hostname.sh start
And I receive bash: /etc/init.d/hostname.sh: No such file directory
For hostname I've use "hostname" and my actual hostname, and both receive the same error.
Although when I do hostname is shows the correct hostname but without the the comcast part of it , and when I type in hostname -f, I get the correct hostname with the comcast part of it.
View 8 Replies
View Related
Jul 4, 2009
I would like to change the start directory, the directory at which ftp/shell points to when the user logs in.
View 1 Replies
View Related
Mar 20, 2011
I messed up the whole thing and the settings. Created some new thing named rhk which I can't remember as it got all messed up and Now I am getting nothing after Linux Mint 10(julia) boots up - no start menu, no panel, no taskbar nothing. I tried to work in the recovery mode and got some(downloaded) 216mb of something(in the repair broken packages). Moreover whenver I have booted in it shows messages like Could not update ICEauthority file /home/rk./.ICEauthority
there is a problem with the configuration server. (usr/lib/libconfig24/gconfsanitycheck2 exited with status 256) The panel encountered a problem while loading "OAFIID: NOME_mintMenu" The panel encountered a problem while loading "OAFIID: GNOME_IndicatorApplet" Naulitis could not create the following reqiured folders: /home/rk/Desktop, /home/rk/. Naulitis Moreover Alt+F2 gives Run application or run with file and nothing seems to be working.
View 2 Replies
View Related
Apr 19, 2010
/etc/init.d/xorg start : No such file or directoryWhen the server boots i get a blinking cursor.
View 2 Replies
View Related
Jul 3, 2010
I urgently need expert assistance. During a cold-start reboot, something corrupted my / directory making it impossible to access much of anything. I was able to log into a recovery console and do "ls /" which shows most of the critical directories although "media" is missing. However attempting to "ls /home" gets the "no such file or directory" error message, as do attempts to ls most of the others. Doing "ls -l /" gets one item listed, followed by a single record out of /var/log/syslog, then nothing at all.
Attempting a normal login (I've disabled the quiet and splash options, so I see all the startup messages) gets to doing fsck on the swap partition, and that stalls out at 14% complete. The fsck on the root partition completed okay, apparently. This machine is my router, firewall, FTP server, and also hosts VirtualBox VMs that contain all of my customer support tools. The VMs themselves are partially backed up on another box, fortunately, but it took me a couple of months to get the failed box configured properly so if possible I need to recover it. For lack of space, I've never been able to do a full backup of it -- and permissions have foiled portions of all my other backup attempts on it.
Complicating matters is the fact that I have a moderately large data recovery job scheduled to arrive this evening (July 3) to be done while the customer's business is shut down for the holiday. Without the FTP server I'm unable to receive the files, which will total from 100 to 200 MB in all. Is it likely that testdisk may be able to rebuild the borked main root directory, if run from a live CD? The system is Hardy LTS 8.04.4, with 3 GB of RAM and a 250 GB SATA drive. I'm posting this from my WinXP laptop, which doesn't get along with my LAN so connects from a different router than the one that's down.
View 3 Replies
View Related
Nov 14, 2010
There are millions of files in many directories. Wherenver i try rm * or find or use xargs, they say 'argument list too long' and exit. How can i deleted files in a directory with so many files without deleting the directory itself.
View 3 Replies
View Related
Aug 12, 2009
I have a problem when a try start my wireless card broadcon 4303, i receive this message.
SIOCSIFFLAGS - no such directory
I use centos 5.2
kernel 2.6.18
View 5 Replies
View Related
Sep 1, 2010
I want to start progrmming in opengl. I am using Ubuntu. do I need just to install a GLUT package.if yes how to do it
View 5 Replies
View Related
Nov 21, 2015
Iceweasel will not start, saying :
(process:12904): GLib-CRITICAL **: g_slice_set_config: assertion 'sys_page_size == 0' failed
Error: Access was denied while trying to open files in your profile directory.
but only for my userid. What home directory resources are required to start?
View 3 Replies
View Related
Jun 12, 2010
I am using Ubuntu 10.04 LTS. Two days ago I updated using update manager. After that I can not boot Ubuntu. When I trying to boot system showing message " Ubuntu is running in low-graphics mode Your screen, graphics card and input device settings could not be detected correctly. You will need to configure these yourself" But I can not configure it.I can not boot to 'recovery mode' also
/var/log/boot.log
Code:
fsck from util-linux-ng 2.17.2
/dev/sda6: clean, 304282/1680960 files, 2964945/6723194 blocks
init: Failed to spawn ufw pre-start process: unable to execute: No such file or directory
[code]....
Now I am using Live CD.
View 3 Replies
View Related
Dec 27, 2010
How to get the contents of a directory in C++?I know about opendir(), but I wonder if there is a C++ way (that uses classes and exceptions).
View 1 Replies
View Related
Dec 14, 2010
I have a database of around 4000 files. I use rsync script to transfer from 2 separate updated hdd every month but I need a way to compare a .txt file or .xml file to the updated drive as I cannot use rsync delete because I can not mount all 3 drives at the same time?
View 9 Replies
View Related
Apr 4, 2011
I need to walk in folder recursively in C. To change the directory, I can use chdir, but how I can get the directories of a directory?
View 3 Replies
View Related
Sep 18, 2015
I’m new to C programming so I wrote the following program to see if everything I needed to write programs with GCC and the standard C library was already installed. I am having issues in OS 10.10.5, where I am unable to build and compile some simple code, either using Xcode or Sublime text. I decided to install Linux Mint in Virtual Box to see if it would work.
Code: Select all#include <stdio.h>
void main()
{
printf("Hello! This is my first C program with Linux Mint
");
}
For some reason, I'm getting the following error:
mint@mint-VirtualBox ~/Desktop $ gcc hello.c -o hello1
hello.c:2:19: fatal error: stdio.h: No such file or directory
#include <stdio.h>
[code]...
View 8 Replies
View Related
Feb 13, 2011
gcc kk.c : kk.c:1: fatal error: gtk/gtk.h: No such file or directory compilation terminated.
View 1 Replies
View Related
Mar 22, 2011
I know this does'nt work but how in my script would I get the script to confirm it's directory is in.
if [ $pwd -eq $LOG_DIR ];
then
echo "work"
[code]...
View 4 Replies
View Related
Apr 2, 2009
I have made the installation of Qt4 in my Fedora/MacBookPro. It also got a first compiling and running a simple program. The point is that for the compiler to run I need to point out every time where the bin is located, as that:
$ /home/threader/kinetic/bin/qmake -project
I have tried the following, but it still doesn't work:
# script
#-----------------------------------------------------------#
# /etc/bashrc or /home/threader/.bash_profile
# config to Qt compiler
[code]....
View 5 Replies
View Related