General
Showing results for 
Search instead for 
Do you mean 

Did I messed up something buy I accidentaly pasting the `/etc/inittab` into the shell.

Visitor

Did I messed up something buy I accidentaly pasting the `/etc/inittab` into the shell.

[ Edited ]

We were doing some system checkup and I entered into the shell (ussing PuTTY): '# more /etc/inittab'.

I then copied the contents of the output with intentions to paste all that into a document. But then accidentally I hit the right click, and in putty that means PASTE so i pasted all that back into the shell.

 

Is it possible that i messed up something? Im going crazy it's a production system. So far everything seems normal but i know that inittab is read during boot time. The '/etc/inittab' is still the same and I confirmed that it hasn't been modified, but I am afraid that I might have messed up something else that will reveal itself later.

 

Also I did some reasearch I found out that '/etc/opt/resmon/persistence/reboot_flag' has been modified today. Can this cause problems on the next reboot? 

 

# more /etc/inittab
init:3:initdefault:
ioin::sysinit:/sbin/ioinitrc >/dev/console 2>&1
tape::sysinit:/sbin/mtinit > /dev/console 2>&1
muxi::sysinit:/sbin/dasetup   </dev/console >/dev/console 2>&1 # mux init
stty::sysinit:/sbin/stty 9600 clocal icanon echo opost onlcr ixon icrnl ignpar </dev/systty
brc1::bootwait:/sbin/bcheckrc </dev/console >/dev/console 2>&1 # fsck, etc.
link::wait:/sbin/sh -c "/sbin/rm -f /dev/syscon;                        /sbin/ln /dev/systty /dev/syscon" >/dev/console
2>&1
cprt::bootwait:/sbin/cat /etc/copyright >/dev/syscon           # legal req
sqnc::wait:/sbin/rc </dev/console >/dev/console 2>&1           # system init
#powf::powerwait:/sbin/powerfail >/dev/console 2>&1            # powerfail
cons:123456:respawn:/usr/sbin/getty console console            # system console
#ttp1:234:respawn:/usr/sbin/getty -h tty0p1 9600
#ttp2:234:respawn:/usr/sbin/getty -h tty0p2 9600
#ttp3:234:respawn:/usr/sbin/getty -h tty0p3 9600
#ttp4:234:respawn:/usr/sbin/getty -h tty0p4 9600
#ttp5:234:respawn:/usr/sbin/getty -h tty0p5 9600
ems1::bootwait:/sbin/rm -f /etc/opt/resmon/persistence/runlevel4_flag
ems2::bootwait:/sbin/cat </dev/null >/etc/opt/resmon/persistence/reboot_flag
ems3:3456:wait:/sbin/sh -c "/usr/bin/touch /etc/opt/resmon/persistence/runlevel4_flag; /usr/bin/chmod 644 /etc/opt/resmo
n/persistence/runlevel4_flag"
ems4:3456:respawn:/etc/opt/resmon/lbin/p_client
#ups::respawn:rtprio 0 /usr/lbin/ups_mond -f /etc/ups_conf
a0:3:off:/usr/sbin/getty -h ttyd2a1 1200
a1:3:off:/usr/sbin/getty -h ttyd2a2 1200
#

 

Below is the actual  paste:

# # more /etc/inittab
init:3:initdefault:
# init:3:initdefault:
stty::sysinit:/sbin/stty 9600 clocal icanon echo opost onlcr ixon icrnl ignpar </dev/systty
brc1::bootwait:/sbin/bcheckrc </dev/console >/dev/console 2>&1 # fsck, etc.
link::wait:/sbin/sh -c "/sbin/rm -f /dev/syscon;                        /sbin/ln /dev/systty /dev/syscon"                     >/dev/console
2>&1
cprt::bootwait:/sbin/cat /etc/copyright >/dev/syscon           # legal req
sqnc::wait:/sbin/rc </dev/console >/dev/console 2>&1           # system init
#powf::powerwait:/sbin/powerfail >/dev/console 2>&1            # powerfail
cons:123456:respawn:/usr/sbin/getty console console            # system console
#ttp1:234:respawn:/usr/sbin/getty -h tty0p1 9600
#ttp2:234:respawn:/usr/sbin/getty -h tty0p2 9600
#ttp3:234:respawn:/usr/sbin/getty -h tty0p3 9600
#ttp4:234:respawn:/usr/sbin/getty -h tty0p4 9600
#ttp5:234:respawn:/usr/sbin/getty -h tty0p5 9600
ems1::bootwait:/sbin/rm -f /etc/opt/resmon/persistence/runlevel4_flag
ems2::bootwait:/sbin/cat </dev/null >/etc/opt/resmon/persistence/reboot_flag
ems3:3456:wait:/sbin/sh -c "/usr/bin/touch /etc/opt/resmon/persistence/runlevel4_flag; /usr/bin/chmod 644     /etc/opt/resmo
n/persistence/runlevel4_flag"
ems4:3456:respawn:/etc/opt/resmon/lbin/p_client
#ups::respawn:rtprio 0 /usr/lbin/ups_mond -f /etc/ups_conf
a0:3:off:/usr/sbin/getty -h ttyd2a1 1200
a1:3:off:/usr/sbin/getty -h ttyd2a2 1200
sh: init:3:initdefault::  not found.
# ioin::sysinit:/sbin/ioinitrc >/dev/console 2>&1
# tape::sysinit:/sbin/mtinit > /dev/console 2>&1
# muxi::sysinit:/sbin/dasetup   </dev/console >/dev/console 2>&1 # mux init
# stty::sysinit:/sbin/stty 9600 clocal icanon echo opost onlcr ixon icrnl ignpar </dev/systty
sh: stty::sysinit:/sbin/stty:  not found.
# brc1::bootwait:/sbin/bcheckrc </dev/console >/dev/console 2>&1 # fsck, etc.
#               /sbin/ln /dev/systty /dev/syscon" >/dev/console                                                      <
sh: link::wait:/sbin/sh:  not found.
# 2>&1
# cprt::bootwait:/sbin/cat /etc/copyright >/dev/syscon           # legal req
sh: cprt::bootwait:/sbin/cat:  not found.
# sqnc::wait:/sbin/rc </dev/console >/dev/console 2>&1           # system init
# #powf::powerwait:/sbin/powerfail >/dev/console 2>&1            # powerfail
# cons:123456:respawn:/usr/sbin/getty console console            # system console
sh: cons:123456:respawn:/usr/sbin/getty:  not found.
# #ttp1:234:respawn:/usr/sbin/getty -h tty0p1 9600
# #ttp2:234:respawn:/usr/sbin/getty -h tty0p2 9600
# #ttp3:234:respawn:/usr/sbin/getty -h tty0p3 9600
# #ttp4:234:respawn:/usr/sbin/getty -h tty0p4 9600
# #ttp5:234:respawn:/usr/sbin/getty -h tty0p5 9600
# ems1::bootwait:/sbin/rm -f /etc/opt/resmon/persistence/runlevel4_flag
sh: ems1::bootwait:/sbin/rm:  not found.
# ems2::bootwait:/sbin/cat </dev/null >/etc/opt/resmon/persistence/reboot_flag
sh: ems2::bootwait:/sbin/cat:  not found.
# /persistence/runlevel4_flag; /usr/bin/chmod 644 /etc/opt/resmo                                                     <
> n/persistence/runlevel4_flag"
sh: ems3:3456:wait:/sbin/sh:  not found.
# ems4:3456:respawn:/etc/opt/resmon/lbin/p_client
sh: ems4:3456:respawn:/etc/opt/resmon/lbin/p_client:  not found.
# #ups::respawn:rtprio 0 /usr/lbin/ups_mond -f /etc/ups_conf
# a0:3:off:/usr/sbin/getty -h ttyd2a1 1200
sh: a0:3:off:/usr/sbin/getty:  not found.
# a1:3:off:/usr/sbin/getty -h ttyd2a2 1200
sh: a1:3:off:/usr/sbin/getty:  not found.
#
1 REPLY
Highlighted
Acclaimed Contributor [Founder]

Re: I pasted the /etc/inittab into the shell. Did I messed up something?

[ Edited ]

>Is it possible that I messed up something?

 

Yes.  Even though most of the command weren't valid, the redirection has taken place.

Here are the commands with redirections and with ";":

ioin::sysinit:/sbin/ioinitrc >/dev/console 2>&1
tape::sysinit:/sbin/mtinit > /dev/console 2>&1
muxi::sysinit:/sbin/dasetup   </dev/console >/dev/console 2>&1 # mux init
stty::sysinit:/sbin/stty 9600 clocal icanon echo opost onlcr ixon icrnl ignpar </dev/systty
brc1::bootwait:/sbin/bcheckrc </dev/console >/dev/console 2>&1 # fsck, etc.
link::wait:/sbin/sh -c "/sbin/rm -f /dev/syscon;   /sbin/ln /dev/systty /dev/syscon" >/dev/console 2>&1

sqnc::wait:/sbin/rc </dev/console >/dev/console 2>&1           # system init

 

These may have wrote something to the console.

 

cprt::bootwait:/sbin/cat /etc/copyright >/dev/syscon           # legal req

 

Since this is a device file and not a file, this probably didn't hurt anything.  But you can just use do it again:

   # /sbin/cat /etc/copyright >/dev/syscon 

ems2::bootwait:/sbin/cat </dev/null >/etc/opt/resmon/persistence/reboot_flag

 

This just zeroed out that file, same as what it would normally do.  Not sure if it should have anything in it?  Try looking at another system.

 

ems3:3456:wait:/sbin/sh -c "/usr/bin/touch /etc/opt/resmon/persistence/runlevel4_flag; /usr/bin/chmod 644 /etc/opt/resmon/persistence/runlevel4_flag

 

Since the semicolon is in quotes, I don't think it did the chmod.

 

>I found out that '/etc/opt/resmon/persistence/reboot_flag' has been modified today. Can this cause problems on the next reboot?

 

I'm not sure what it does but you may have messed up that file.  See above.