First Last Prev Next    No search results available      Search page      Enter new bug
Bug#: 130476
Alias:
Product:
Component:
Status: RESOLVED
Resolution: FIXED
Assigned To: Gentoo Catalyst Developers <catalyst@gentoo.org>
Hardware:
OS:
Version:
Priority:
Severity:
Reporter: Alvin Lee <liyiming@ict.ac.cn>
Add CC:
CC:
URL:
Summary:
Status Whiteboard:
Keywords:

Filename Description Type Creator Created Size Actions
Create a New Attachment (proposed patch, testcase, etc.) View All

Bug 130476 depends on: Show dependency tree
Bug 130476 blocks:
Votes: 0    Show votes for this bug    Vote for this bug

Additional Comments: (this is where you put emerge --info)


Not eligible to see or edit group visibility for this bug.






View Bug Activity   |   Format For Printing   |   XML   |   Clone This Bug


Description:   Opened: 2006-04-19 06:38 0000
These codes will be found in /usr/lib/catalyst2/targets/support/rc-update.sh
It's intend is to remove runlevel in which have no regular file,but there may
be some link files in it. So we cannot use command rmdir but rm -rf 


CONTENTS=$(find /etc/runlevels/${x} -type f)
if [ -z "${CONTENTS}" ]
then
      echo "${x}: Empty runlevel found.... deleting"
      rmdir "/etc/runlevels/${x}"
fi

------- Comment #1 From Alvin Lee 2006-04-19 06:40:13 0000 -------
I have forgot to give the exact line number of these words.
They are lying in the last 10 lines of rc-update.sh

------- Comment #2 From Chris Gianelloni (RETIRED) 2006-04-19 06:53:31 0000 -------
I really do appreciate your finding these bugs.  Is there a chance I could get
you to start provising patches instead?  It makes things much easier.

cp filename filename.orig
edit filename (fix bug)
diff -uN filename.orig filename > filename.patch

This way there's no confusion on what you think should/needs to be changed.

Also, if there are symlinks in the runlevel, we shouldn't be removing it, so I
think instead the CONTENTS variable needs adjustment to look for both files
*and* symlinks.  Wouldn't you agree?

------- Comment #3 From Andrew Gaffney 2006-04-19 06:59:35 0000 -------
A better solution is probably to check for symlinks instead of files with 'find
/etc/runlevels/${x} -type l'.

If the runlevel is one of the default ones provided by baselayout, it will
probably have a .keep file in it. While it's unlikely that the boot or default
runlevels will ever be empty, it's still probably a good idea to make sure that
/etc/runlevels/${x}/.keep doesn't exist before removing the directory and bail
out (non-fatally, of course) if it does exist.

------- Comment #4 From Alvin Lee 2006-04-19 07:26:14 0000 -------
yeah,I think you are right. I was just wondering if deleting runlevel in which
have no regular files, maybe there will no runlevel left because most of files
in runlevel are links. And I promise that I will use patch next time to make
things easier.^^

------- Comment #5 From Chris Gianelloni (RETIRED) 2006-04-19 07:45:01 0000 -------
No problem, Alvin.  =]

Anyway, I think instead I'm going to remove all of the code for runlevel
removal, since there's not really much point in it and the runlevels need to be
present for the installer anyway, even if they are empty.

------- Comment #6 From Chris Gianelloni (RETIRED) 2006-04-25 08:14:45 0000 -------
Fixed in 2.0_rc43 and above.

First Last Prev Next    No search results available      Search page      Enter new bug