summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--debian/changelog11
-rw-r--r--init14
-rw-r--r--scripts/local8
-rw-r--r--scripts/nfs8
4 files changed, 28 insertions, 13 deletions
diff --git a/debian/changelog b/debian/changelog
index 7f0053e..b96929f 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,10 +1,13 @@
-initramfs-tools (0.8) UNRELEASED; urgency=low
+initramfs-tools (0.8) breezy; urgency=low
-
+ The "We are one in the spirit..." release
- *
+ * Export the command line variables so that the various scripts
+ can see them.
- -- Jeff Bailey <jbailey@ubuntu.com> Mon, 13 Jun 2005 01:53:01 +0000
+ * Honour command line 'ro' or 'rw' settings for nfs.
+
+ -- Jeff Bailey <jbailey@ubuntu.com> Tue, 14 Jun 2005 21:35:14 +0000
initramfs-tools (0.7) breezy; urgency=low
diff --git a/init b/init
index 733e7fd..31a16c0 100644
--- a/init
+++ b/init
@@ -19,11 +19,11 @@ mount -t proc proc /proc
. /scripts/functions
# Parse command line options
-init=/sbin/init
-root=
-ro=-r
-break=
-rootmnt=/root
+export init=/sbin/init
+export root=
+export readonly=y
+export break=
+export rootmnt=/root
for x in $(cat /proc/cmdline); do
case $x in
init=*)
@@ -39,10 +39,10 @@ for x in $(cat /proc/cmdline); do
BOOT=${x#boot=}
;;
ro)
- ro=-r
+ readonly=yes
;;
rw)
- ro=-w
+ readonly=no
;;
break)
break=yes
diff --git a/scripts/local b/scripts/local
index b322f09..cf9e331 100644
--- a/scripts/local
+++ b/scripts/local
@@ -14,8 +14,14 @@ mountroot ()
run_scripts /scripts/local-premount
+ if [ ${readonly} = y ]; then
+ roflag=-r
+ else
+ roflag=-w
+ fi
+
# Mount root
- mount ${ro} -t ${FSTYPE} ${ROOT} ${rootmnt}
+ mount ${roflag} -t ${FSTYPE} ${ROOT} ${rootmnt}
run_scripts /scripts/local-bottom
}
diff --git a/scripts/nfs b/scripts/nfs
index 9860ea7..d8a259a 100644
--- a/scripts/nfs
+++ b/scripts/nfs
@@ -12,7 +12,13 @@ mountroot ()
run_scripts /scripts/nfs-premount
- nfsmount ${NFSROOT} ${rootmnt}
+ if [ ${readonly} = y ]; then
+ roflag="-o ro"
+ else
+ roflag="-o rw"
+ fi
+
+ nfsmount ${roflag} ${NFSROOT} ${rootmnt}
run_scripts /scripts/nfs-bottom