Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 141392 - New sys-block/vblade initscript won't work
Summary: New sys-block/vblade initscript won't work
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Robin Johnson
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-07-22 08:31 UTC by Norberto Bensa
Modified: 2006-07-22 12:52 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Norberto Bensa 2006-07-22 08:31:50 UTC
This line from vblade-10-r1 will fail:

ps -Ao pid,args |egrep "^[[:digit:]]+ /usr/sbin/vblade ${@}" | awk '{print $1}' | xargs kill

... when vblade's pid is, for example, 4 digits and you have other programs running with pids of 5 or more digits. Take a look at this:

zeddmore init.d # ps -Ao pid,args
.
.
.
 5496 tlsmgr -l -t unix -u
 7059 pickup -l -t fifo -u
 7194 sshd: nbensa [priv]
 7199 sshd: nbensa@pts/0
 7200 -bash
 7205 su
 7206 bash
11593 /bin/sh /usr/sbin/vbladed 0 0 eth0 /dev/hda
11596 /usr/sbin/vblade 0 0 eth0 /dev/hda
11597 /usr/bin/logger -t vblade.vblade0
11641 ps -Ao pid,args

zeddmore init.d # ps -Ao pid,args | egrep "^[[:digit:]]+ "
11593 /bin/sh /usr/sbin/vbladed 0 0 eth0 /dev/hda
11596 /usr/sbin/vblade 0 0 eth0 /dev/hda
11597 /usr/bin/logger -t vblade.vblade0
11644 ps -Ao pid,args
11645 egrep ^[[:digit:]]+


You need to remove the "^" from the RE to make it work.
Comment 1 Robin Johnson archtester Gentoo Infrastructure gentoo-dev Security 2006-07-22 12:52:55 UTC
fixed.
Removing ^ was not the best option, as it could then catch some other arguments.
Adding [[:space:]]* between the ^ and [[:digit:]]+ is the best solution.