On Mon, 2004-04-26 17:01:29 +0200, Andrew Miehs <[EMAIL PROTECTED]> wrote in message <[EMAIL PROTECTED]>:
[ If you start with a new topic, please start with a fresh email. DON'T take some random old mail and delete it's subject - you'll break proper threading! Thanks. ] > I have recently discovered that my PXE install scripts are destroying my > ext3 file systems, due to me not unmounting the drive before rebooting. > The second part of my install chroots into /target and runs apt-get > dselect-upgrade. Unfortunately, I can not umount the new root disk > '/target' due to the fact that apt-get restart's sshd and ntp, etc. This > causes the files to be considered as open, and I would have to force an > unmount. > Is there any way that I can tell apt-get NOT to start/ restart the > services and just install and configure them? Prior chroot'ing to /target: # mv /target/sbin/start-stop-daemon /target/sbin/start-stop-daemon.keep # echo '#!/bin/sh' > /target/sbin/start-stop-daemon # echo 'exit 0' > /target/sbin/start-stop-daemon # chmod +x /target/sbin/start-stop-daemon Now, do your chroot work, and finally: # [ `stat --format '%s' /sbin/sbin/start-stop-daemon` -lt 200 ] && mv # /target/sbin/start-stop-daemon.keep /target/sbin/start-stop-daemon That'll restore start-stop-daemon IFF it wasn't replaced during something (eg. if you do your apt-get <something>, it *might* place a newer version of s-s-d, which you want to keep, of course:) However, if apt-get decides to install a new version of s-s-d, you're f*cked up again... MfG, JBG -- Jan-Benedict Glaw [EMAIL PROTECTED] . +49-172-7608481 "Eine Freie Meinung in einem Freien Kopf | Gegen Zensur | Gegen Krieg fuer einen Freien Staat voll Freier Bürger" | im Internet! | im Irak! ret = do_actions((curr | FREE_SPEECH) & ~(NEW_COPYRIGHT_LAW | DRM | TCPA));
signature.asc
Description: Digital signature