summaryrefslogtreecommitdiffstats
path: root/urpm
diff options
context:
space:
mode:
authorRafael Garcia-Suarez <rgarciasuarez@mandriva.org>2004-12-24 10:08:39 +0000
committerRafael Garcia-Suarez <rgarciasuarez@mandriva.org>2004-12-24 10:08:39 +0000
commit8ffb2ea28196ddeca75ef14eb356ee53ef08bc72 (patch)
tree911e43d68bcce54aa332c525b8f356a9b8f3dc6e /urpm
parentb99d49170f0d0d9c39481f1925e66ec3ca17bade (diff)
downloadurpmi-8ffb2ea28196ddeca75ef14eb356ee53ef08bc72.tar
urpmi-8ffb2ea28196ddeca75ef14eb356ee53ef08bc72.tar.gz
urpmi-8ffb2ea28196ddeca75ef14eb356ee53ef08bc72.tar.bz2
urpmi-8ffb2ea28196ddeca75ef14eb356ee53ef08bc72.tar.xz
urpmi-8ffb2ea28196ddeca75ef14eb356ee53ef08bc72.zip
As suggested by Giuseppe Ghibo, fail early if an essential filesystem
is mounted read-only
Diffstat (limited to 'urpm')
-rw-r--r--urpm/sys.pm13
1 files changed, 13 insertions, 0 deletions
diff --git a/urpm/sys.pm b/urpm/sys.pm
index 97f37435..1ccc3b6e 100644
--- a/urpm/sys.pm
+++ b/urpm/sys.pm
@@ -107,4 +107,17 @@ sub find_mntpoints {
@mntpoints;
}
+#- checks if the main filesystems are writeable for urpmi to install files in
+sub check_fs_writable () {
+ open my $mounts, '/proc/mounts' or do { warn "Can't read /proc/mounts: $!\n"; return 1 };
+ local *_;
+ while (<$mounts>) {
+ (undef, our $mountpoint, undef, my $opts) = split ' ';
+ if ($opts =~ /\bro\b/ && $mountpoint =~ m!^(/|/usr|/s?bin)$!) {
+ return 0;
+ }
+ }
+ 1;
+}
+
1;
div>
-rw-r--r--rescue/list.xml30
1 files changed, 16 insertions, 14 deletions
diff --git a/rescue/list.xml b/rescue/list.xml
index 06da9b40f..322bd3f8a 100644
--- a/rescue/list.xml
+++ b/rescue/list.xml
@@ -43,7 +43,7 @@
sync
eject
- mount mount.nfs umount
+ mount mount.nfs mount.ntfs-3g umount
losetup
ldconfig
@@ -51,37 +51,39 @@
reboot halt shutdown
kill killall5 ps strace
sed tr
+ strings
loadkeys tset stty
ping hostname ifconfig route
fdformat badblocks
- e2fsck fsck.ext2 fsck.ext3 mke2fs mkfs.ext2 mkfs.ext3 mkfs.ntfs resize2fs
- mkfs.ext3 mkfs.reiserfs mkfs.xfs mkfs.jfs
- debugfs dumpe2fs tune2fs
- fsck.xfs xfs_repair
- resize_reiserfs reiserfsck
mkswap swapoff swapon
+ e2fsck fsck.ext2 fsck.ext3 fsck.ext4
+ mke2fs mkfs.ext2 mkfs.ext3 mkfs.ext4
+ tune2fs resize2fs debugfs
+
+ mkfs.reiserfs resize_reiserfs reiserfstune reiserfsck
+ mkfs.xfs xfs_admin xfs_repair fsck.xfs
+ mkfs.ntfs mkdosfs dosfslabel mkntfs ntfsresize ntfslabel
<if ARCH="i.86|x86_64">
- fsck.jfs
- strings
- </if>
- <if ARCH="i.86|x86_64|ia64">
- ntfsresize
- mkdosfs
+ mkfs.jfs fsck.jfs jfs_tune
</if>
+ quotacheck
+ cryptsetup dmsetup
+
<if ARCH="ppc">
hformat
</if>
<if-not ARCH="ppc">
fdisk gpart
- testdisk
+ testdisk photorec
</if-not>
+
<if-not ARCH="ppc|sparc">
sfdisk
- </if-not>
+ </if-not>
<if ARCH="ppc">
pdisk