General :: Mention List Of Services In The Same File And Still Make The Script Work?
Jan 26, 2010
I have a script from which i want to disable unwanted services. I wanted to have the list of unwanted services in the same script file. I tried the following, but it is not working...How do I mention list of services in the same file and still make the script work ?
Code:
#/bin/bash
#List of services, modify list between SERVICES tag
service_list=$(cat <<SERVICES
acpid
apmd
avahi-daemon
i know that there is already a command for it but it comes out with a lot of letters that makes it hard to find the services that are runningi'm talking about services like DNS, APACHE, DHCP, SAMBA, SSH etcis there a command that will list these services and related services that are running instead of showing a bunch of jumbled and lettered mess thats hard to comprehend
I have a bit of a problem and the only solution I can think of at the moment is a very tedious one, so I was hoping there would be a better way. What I am trying to do is cross compile the PPPD program so that I can install it on an embedded system (this system does not have make/gcc on it). It was easy to cross compile it, but I can not run "make install" since I'm compiling on a secondary machine. I don't want to install PPPD on this secondary machine (I couldn't anyway, because it was compiled for a different architecture) and I can't run make install on the target machine because there is no make/build system for it.
So it seems like what I would have to do is to manually copy over each compiled file from the build machine to the appropriate location of the target machine. And the only way (that I know of) to figure out how to do this is to manually examine the Makefiles (yes, there are several for PPPD) and figure out which file should go where on the target system. This isn't trivial because it uses a hierarchy of makefiles and the probability of human error for this method is high.
Is it possible that I could run another command that would give me a list of all the commands that make install would perform? Or a list of all files and their target location for "make install"? Or possibly some other solution that I am completely unaware of that would make this task not so painful and error prone?
I'm trying to find the systemctl equivalent of "chkconfig --list".$ systemctl -t service -alooks like the command, but it does not return any line about the ntp service. It does exist because I get this:
$ systemctl status ntpd.service ntpd.service - Network Time Service Loaded: loaded (/lib/systemd/system/ntpd.service)
I spent a few minutes googling this, but I am not even sure what to search for. I suspect I'm looking at part of upstart, but it could also be sysvinit, plymouth or something else entirely. Every time I reboot, just between plymouth's splash screen and gdm loading, I am shown a list of services starting. The list shows the names of the services and [OK] if they started sucessfully or [fail] if they did not (only apport ever fails and only occasionally). I don't need or want to see this list. It also interrupts the transition from Grub to GDM (the background color should be the same shade of purple from grub all they way to the desktop, but this list is presented as ordinary terminal output: white text on black background)
On my CentOS 5.4 box I run dns, ssh, and smtp servers. This box also has to be able to resolve and browse websites. So basically it needs iptable rules for
TCP 22 25 80 443 UDP 53
My question is, which of these services work nicely with connection tracking? I'm a little confused about how connection tracking works. For example say this iptables rule for smtp
Code: iptables -A INPUT -s 0/0 --sport 513:65535 -d $myip --dport 25 -j ACCEPT versus
Code: iptables -A INPUT -s 0/0 --sport 513:65535 -d $myip --dport 25 -m state --state NEW,ESTABLISHED -j ACCEPT So with connection tracking what exactly does it do that my first iptables rule does not do?
Also for centos is that port range correct? 2.6 Linux kernel randomly chooses a port 513-65535 when it connects to an external smtp server or say browses a site.
According to security manual only DNS, files, or LDAP should be allowed in nsswitch file however it seems like i have many other services configured in nsswitch files.
below are the content from nsswitch file. What services can be removed considering the system stability.
Code: passwd: files shadow: files group: files hosts: files dns
I am slowly rebuilding my network after a HDD crash that took out my primary development box. I installed Lucid Lynx and have things (mostly) working. The issue I am having has to do with file completion and history. I could set filec in my .cshrc file and it would work as it usually does (hit <TAB? key after typing in a couple of letters of a file name and BOOM the file auto-completes). For some reason, when I do the same thing, I get a literal TAB entered on the line. Also, if I attmept to utilize history (either the up-arrow from the keyboard I see ^[ instead of the last executed command(s).
I have downloaded conky but cant make it work. I have so far installed from terminal. But I do not see it in my desktop. Where do I create the rc file?
I recently upgraded from fc8. I am running two nvidia NVS 285 cards with four monitors and using nvidia driver 190.53-pkg1. I have one card up and running and can edit the config file and make to other two work I just can't get all four to work together.
I have installed backtrack4 on my laptop with windows7, and installed grub2.I am having a problem on showing a splash screen.I don't have a splash screen that shows neither on grub2 nor grub legacy.I have searched too many tutorials, but I don't know what's the problem, because all of them shows how to change the splash image, but don't mention anything about enabling it.Note that the live cd loads an image.So I don't think it's my vga or something.
I have generated a list of directories that I would like to use ls and grep on, but it is not working. I am using the commandCode:cat directories.dat | xargs lsand I get a whole lot of these errors:Code:ls: cannot access ./foo/bar/baz/grault/*: No such file or directorybut when I try the directories manually one at a time I find that they all exist and all have files in them. Same thing if I try to grep anything. What is going wrong?
I'd like to announce the release of cmus 2.3.0 here. cmus 2.3.0 features gapless MP3 playback, native PulseAudio output plugin (which cures all the problems with PA ALSA emulation present in 2.2.0), very fast metadata cache and much improved compilations handling.
Not to mention tons of bugfixes since 2.2.0, which was released almost 3 years ago.[URL]..
I'm currently stuck at 6.13 GMP-5.0.0 of the LFS installation. After running make, I receive the following:
error while loading shared libraries: libbfd-2.20.so: cannot open shared object file: No such file or directory make[2]: *** [libmpn.la] Error 127 make[2]: Leaving directory `/sources/gmp-5.0.0/mpn'
I have a bunch of tar files in a folder with the name in 'file_name.MMDDYYYY.HH.mm.SS.tar' format. I need to write a shell script that picks latest and greatest of the above tar files and extracts it to a particular folder
I've published a samba share on a Ubuntu 8.10 server, and mounted the share on a windows box. For some strange reason the files are not sorted by file name (nor by any other sorting type) if I list them from the Windows command line (dir). I could always use the "dir /on" parameter, but I hope there's a way to make samba sort the files for me
I am trying to write a script to pick the directory name from a list of file. Here is a detailed picture.Have a file name LIST which contains the follwing for example/apps/oracle/product/test1/apps/oracle/product/test2/apps/oracle/product/test3I need a script that reads these line from LIST and creates foldersin /apps/oracle/product/test1/backup/date/test1 after reading the first line /backup/date/test2 after readin the second line/backup/date/test3 and so on.
I am using endian firewall 2.4 and squid 2.6, everything is working fine for me. In squid report i am getting download list by user or IP based. Now my question is, is this possible to get user based uploaded file using HTTP POST. Is there any configuration have to be done is squid.conf, if answer is yes then please give me the what is configuration i have to give. Example: if suppose user uploading a image file into facebook.com, i want to track the file name and which IP address and then where its uploaded.
i am having a problem concern zlib installation.i tried configure file successfully but make file displayed some errors.that usr/linux/limits.h not found.so i found that i have to install glibc-headers-devel...but there is no such a kind of package in ubuntu repository?/????/some people saying that libc6-devel is equal to them!
So I want to get mount/umount option under right click services menu. I went to Dolphin -> Settings -> Configure Dolphin -> Services -> Download New Services and from there I installed KDE CDEmu Emulator and MountISO. But neither of them is showing up in actual context menu. Neither in Dolphin -> Settings -> Configure Dolphin -> Services for that matter. I tried to install them as normal user and as a root. I went to have a peak in /usr/share/kde4/services/ServiceMenus/ but they aren't there as well... It's just me or lots of things seems to be not quite working in 11.3?