I Want A Process To Pause Or Something

When I do apt-get update and apt-get upgrade, both times I have to unplug my ethernet cord right after it's done downloading the stuff and right before it finishes saying "reading changelogs" and stuff because maybe a second or three after it finishes reading the changelogs my firewall will be lowered. If I unplug my ethernet cord in time I just reset the iptables and plug my ethernet cord back in. For really small upgrades it will finish downloading and reading changelogs too quick so I'm not sure if my firewall was lowered or not and I have to reinstall. I just want it to pause or wait for 5 seconds or something after the upgrades are downloaded. Is there any way for me to do this?


Similar Content



Tough Network Question

hi guys, i hope you can help me out.
i am wired connected to a 1gb ethernet connection that has a 1gb switch or ethernet hub between the internet and my computer.

the ethernet hub also has a drive connected to it whci i can see with my macs but it doesnt show up on the linux.

i can see the ethernet hub on the linux but nothing after that. how do i get to see the other drives connected to the ethernet hub?

Firewall-cmd --state "not Running"

I have been flailing trying to get a web server running on Fedora 21.

Finally did so.

I have my iptables working (me thinks) as they should. I can connect from my Linux box (local) or from my Mac on the same network/subnet.

Problem is in my "travels" I have somehow trashed my firewall-cmd.

I was adding parameters to it w/o issue. E.G
firewall-cmd --zone=public --add-port=80/tcp --permanent
Then restarting firewall-cmd
firewall-cmd --realod

This was all working. I "fixed" my problem with connecting to my web server from other LAN workstations (iptables issues) and was going back to see if all was well. Now when I try to restart I get a:
FirewallD is not running
That from my "reload" command above.

Have I fixed my web server issue or is my world wide open att?

Assistance, as always, greatly appreciated.

Skip

Bash Shell Script Help Please

I want to write a bash shell script to execute a command for one minute then stop that command (ctrl c) pause for 10 seconds then run another command for one minute then stop that command pause for 10 seconds then go back to the begining of the script and loop indefinetly.

First I want to run this command for one minute;

reaver -i mon0 -c 6 -b "mac address" -a -vv

stop previous command and pause for 10 seconds

Then run this command for one minute;

airodump-ng -i mon0

stop previous command and pause for 10 seconds

Then recall reaver command and continue to loop through until reaver spits out result.

I imagine I will need to create a function for each command, an if statement and an ifelse statement and I will need the break and sleep commands. but I am not sure about the syntax, PLEASE HELP THIS NOOB!

Linux Not Accepting Udp And Tcp Ethernet Packets

I am trying to build a socket to retrieve the ethernet packets from ecu. When i run my code on windows there is no problem and the code runs correctly. But when i run my code on Linux it gets stuck at s.recv(65565). I have already set static ip in /etc/network/interfaces as follows: iface eth0 inet static address 160.48.199.91 netmask 255.255.255.0 gateway 160.48.199.254

I tried a simple code of socket on raspberry pi. but it still gets stuck at s.recv(65565). I also tried to implement the program using multicast. but the problem is that when i create a socket for icmp protocols then I could see the data from the ECU after using command "ping -I echo 239.192.255.251" in another terminal. (where 239.192.255.251 is the multicast address) But when I change the socket protocol type to udp, tcp or raw then it again gets stuck at s.recv().

Imp: When i run the "netstat -s" command in terminal then i could see that there are 0 messages received for udp and tcp. But in Wireshark i could see the udp messages from ECU. Is linux killing all the udp and tcp packets ? How should i solve this ?
(complete setup is connected as: ECU ---> Media converter ---> Raspberry Pi. There is no LAN, no firewall, no internet)

Could anyone please help me with this problem ?

Get The Time When Nohup R Program Finishes

I want to get the time when program starts and finishes. But it always show the same time. Here is my shell script. But it always show that `START TIME` is same as `END TIME`.
Code:
host_list=("c15-0330-01.ad.mtu.edu" "c15-0330-02.ad.mtu.edu" "c15-0330-03.ad.mtu.edu" "c15-0330-04.ad.mtu.edu")
program=("L_1" "L_4" "L_3" "L_4")
subject="The job is finished"
START=$(date +"r")
address="/home/campus27/zwang10/Desktop/AWRR/program/power/vmodel_1/nprot/K_10"
ssh -f "${host_list[0]}" "cd '$address' && nohup Rscript '${program[0]}.R' > '${program[0]}_sh.txt';echo 'The job\n $address\n${program[0]} is finished\nSTART TIME = $START\n' END TIME =`date +"%r"` | mutt zwang10@mtu.edu -s '${host_list[0]} - Job ${program[0]}.R finished' -a '$address/${program[0]}_sh.txt';"

Upgrade From Squeeze To Wheezy Network Issue

I recently decided to upgrade from Debian Squeeze to Wheezy. Update seemed to go fine with the exception of the following warning concerning my Broadcom bmc5704 gigabit ethernet cards

Quote:
W: Possible missing firmware /lib/firmware/tigon/tg3_tso5.bin for module tg3
W: Possible missing firmware /lib/firmware/tigon/tg3_tso.bin for module tg3
W: Possible missing firmware /lib/firmware/tigon/tg3.bin for module tg3
No problem I will simply install the missing .bin files after the upgrade. Get the .bin files from the Debian repository and install them using the command "dpkg -i file_name.deb" then ran "apt-get install -f" for good measure. Still nothing, I have downloaded the following files and running that same command for each hoping that this would solve my compatibility issue with no such luck.

Quote:
firmware-bnx2_0.36+wheezy.1_all.deb
firmware-bnx2x_0.36+wheezy.1_all.deb
firmware-linux-nonfree_0.36+wheezy.1_all.deb
firmware-linux-nonfree_0.36+wheezy.1~bpo60+1_all.deb
When I attempt to go into System Preferences > Network I get the message "The system network services are not compatible with this version."

I showed the hardware using the lshw command and here is the entry concerning the ethernet interface

Quote:
#output from lshw command

*-network:0
description: Ethernet interface
product: NetXtreme BCM5704 Gigabit Ethernet
vendor: Broadcom Corporation
physical id: 2
bus info: pci@0000:02:02.0
logical name: eth0
version: 10
serial: 00:13:21:b2:cf:46
size: 100Mbit/s
capacity: 1Gbit/s
width: 64 bits
clock: 66MHz
capabilities: pcix pm vpd msi bus_master cap_list ethernet physical tp 10bt 10bt-fd 100bt 100bt-fd 1000bt 1000bt-fd autonegotiation
configuration: autonegotiation=on broadcast=yes driver=tg3 driverversion=3.116 duplex=full firmware=5704-v3.41, ASFIPMIc v2.36 ip=XX.XX.XX.154 latency=64 link=no mingnt=64 multicast=yes port=twisted pair speed=100Mbit/s
resources: irq:25 memory:fdf70000-fdf7ffff
Network file configuration.

Quote:
# Network file

# This file describes the network interfaces available on your system
# and how to activate them. For more information, see interfaces(5).

# The loopback network interface
auto lo
iface lo inet loopback

# The primary network interface
allow-hotplug eth0
iface eth0 inet static
address XX.XX.XX.XX
netmask 255.255.255.0
network XX.XX.XX.0
broadcast XX.XX.XX.255
gateway XX.XX.XX.1
# dns-* options are implemented by the resolvconf package, if installed
dns-nameservers XX.XX.XX.XX 8.8.8.8
dns-search XXXXXXX.net
Server is an older HP ProLiant and I am attempting to put Wheezy on it from a direct upgrade from squeeze.

At this point I am stumped. Not sure exactly what to do but it seems like a fairly simple fix. If anyone has any suggestions I would sure appreciate the help. Let me know if you need anything.

Direct Connection Via Ethernet

Hi I am not a complete Linux newbie, but I have a challenge that is new to me.

I am wanting to be able to connect to a linux box (Raspberry Pi running Debian) via ssh directly from a single computer. I want to be able to plug in a ethernet cable from a laptop to the Raspberry Pi so that I can configure it via ssh or a webpage.

I have had a few pieces of hardware, routers, printers etc that allow this sort of connection for configuration, I just would like to know how it is done.

My question is how do I set up the /etc/interfaces file to allow the Raspberry Pi to be found by the laptop.

Once configured I would want the Raspberry Pi to obtain its IP address via DHCP when connected to a network.

Any suggestions, ideas would be appreciated.

Iphone Notrecognised By Ubuntu 14

I've downloaded ifuse and read and followed several instructions but cannot connect my iphone 4s to download pictures. I'm thinking it may be a hardware problem (usb?). There is no reaction to connecting the phone via usb cord. There's no instance of it in the file system.
Any help please. Thanks.

Script While Loop

Hello,
I'm working on a shell script that needs to read the a file (file1) a batch (read 2000 lines at a time) and then write those lines to seperate file which I'm using to run ldapmodify command. I need to check some other file size and once this file less than 200kb, i would need to run second batch and so on until file1 is empty.
Quote:
#!/bin/bash
set -x
filesize=200
server=10.11.xxx.xx
filename=fileimport.txt
taofile1=687686.txt
taofile=/var/opt/$taofile1

stty -echo
echo -n "Enter password: "
read passwd
stty echo
context="cn=user1,ou=org1,ou=org2,o=org"
if [[ -s "$filename" ]];then
for lines in $filename
do
head -99997 fileimport.txt >> ldapreadd.ldif && sed -i '1,+99996d' fileimport.txt
if [ -s ldapreadd.ldif ];then
ldapmodify -h $server -p 389 -D $context -w $passwd -v -x -f ldapreadd.ldif &> /dev/null
echo "LDIF script is running. Please wait..."
sleep 60
if [ -f "$taofile" ];then
taofilesize=`stat -c %s ${taofile}`
# if [ "$taofilesize" -ge 200 ];then
while [ `stat -c %s ${taofile}` -ge 200 ]
do
echo " Driver is processing LDIF file. Please wait..."
sleep 60
done
fi
rm -rf ldapreadd.ldif
fi
done
else
echo "$filename file is empty. Exiting script..."
exit
fi

I have 2 issues here. first one script is not reading exact lines as specified. Some times its reading more lines some times less lines. Second issues once it run the first batch, script is exiting. Please advise.

Problem With Firewall. :(

Hi,
i have a index page in /var/www/html, from the local machine i can open the page as localhost or the machine name even the firewall is on or off, But when i type the ip of the machine in another LAN pc it automautically navigate to another folder say like 192.168.1.1 enter -> 192.168.1.1/newpage and gives out 404 error when the firewall is up but i get the page when the firewall is down what do i do?