diff options
Diffstat (limited to 'scripts')
-rw-r--r-- | scripts/local | 8 | ||||
-rw-r--r-- | scripts/nfs | 8 |
2 files changed, 14 insertions, 2 deletions
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 |